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.0.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.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: indexable_generator-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f0b317c8f1d8592fd4fb39325ed582efcbb9486f2825b5a3b78ea13d1d589af8
MD5 5a647d6b534425d5bb1aa9d6de259db7
BLAKE2b-256 dcce18f985906c91d8c71664c4ed6366470a79cf1c2b764b6f1af348b67e5c4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for indexable_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65ed84d066aea4ab782cf32becfefc604bc761d4d72ffea0526679a18dfd8db1
MD5 88980c6f59367d999526994ca823369d
BLAKE2b-256 cdcbef6d5df2aed6348824ab51153ee3fc9c598530a7b7d91411c08b2084275a

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