Skip to main content

A living example of superfunctions

Project description

supertime: a living example of the superfunctions

The [transfunctions])https://github.com/pomponchik/transfunctions library introduces a new type of function: superfunction. They can behave both as regular and asynchronous functions, depending on the context, that is, on how the user uses them. This micro-library demonstrates the smallest example of this concept that I could come up with.

Install it:

pip install supertime

And try:

from asyncio import run
from supertime import supersleep

supersleep(5)  # sleeps 5 sec.
run(supersleep(5))  # sleeps 5 sec., but ASYNCHRONOUSLY.

As you can see, the superfunction can automatically adjust to how the calling code uses it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supertime-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

supertime-0.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file supertime-0.0.1.tar.gz.

File metadata

  • Download URL: supertime-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for supertime-0.0.1.tar.gz
Algorithm Hash digest
SHA256 79d5c08ad209012e7376c9a242588316617e049b90c5491a81174d3596487d86
MD5 47205fb43e99b0fcf5aedd8de0b03a74
BLAKE2b-256 e848204f5744d3cb62f422c60efe53536735ec94fd2267cfe61cda05a860bb72

See more details on using hashes here.

Provenance

The following attestation bundles were made for supertime-0.0.1.tar.gz:

Publisher: release.yml on pomponchik/supertime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file supertime-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: supertime-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for supertime-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0484bfdddc59a7a0e6a0472f828b13eafafbc0d35ed4816283f1601bf26e6d74
MD5 a1fb3de240c146e95fc1e31180b06864
BLAKE2b-256 ffb942e659da40dabc55541fdc7089c21bef75652a20eb8972c1143af986227b

See more details on using hashes here.

Provenance

The following attestation bundles were made for supertime-0.0.1-py3-none-any.whl:

Publisher: release.yml on pomponchik/supertime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page