Skip to main content

Implement Sequence functionalities to python Generators.

Project description

IndexableGenerator

Implement Sequence functionalities to python Generators.

These include getitem, index and length. Values are cached as they are consumed from the generator.

Examples:

@IndexableGenerator.cast
def gen():
    for x in range(10):
        yield x

ig = gen()
ig[3:6]  # (3, 4, 5)

ig = IndexableGenerator((x for x in range(10)))
ig[3:6]  # (3, 4, 5)

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

indexable_generator-1.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

indexable_generator-1.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file indexable_generator-1.0.1.tar.gz.

File metadata

  • Download URL: indexable_generator-1.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for indexable_generator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ffc16fdc00d2c14c5b483ee8b07c4ccb4fec298ca9b7fde6ddc86db6586a5725
MD5 7cb0e9a144e317e6d920d4a0e4e5db59
BLAKE2b-256 ce59e935902ec5f7188bef4c1fc7444c5c1bbf25e27f16cb3bff892a66ac5f40

See more details on using hashes here.

File details

Details for the file indexable_generator-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for indexable_generator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3a0b722c22fd8a0848ddde5f39eefdb431d504c470d48da8d56af6ae225269b
MD5 0b8de00132c0b2ae618fad9d9e6b8d43
BLAKE2b-256 b171393fbdfae674e3509009aa7c857f89f5b64d1b44024853ced7ba64d258a8

See more details on using hashes here.

Supported by

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