This small package provides a proxy list to a list-returning function:
>>> from lazylist import LazyList >>> l = LazyList(lambda: x) >>> x = [1, 2, 3] >>> list(l) [1, 2, 3]
More precisely, view function doesn’t have to return an exact list, but an any squence object e.g. str, tuple:
>>> x = "hello" >>> list(l) ['h', 'e', 'l', 'l', 'o']
It satisfies collections.abc.Sequence protocol:
>>> from collections import Sequence >>> isinstance(l, Sequence) True >>> l[-1] 'o' >>> len(l) 5
However, it doesn’t satisfy collections.abc.MutableSequence protocol. In other words, it’s immutable:
>>> from collections import MutableSequence >>> isinstance(l, MutableSequence) False >>> l[0] = 'H' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'LazyList' object does not support item assignment
Distributed under LGPLv3 or higher.
Todos
LazySet
LazyMap
Metadata
Release files for lazylist 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lazylist-0.9.0.tar.gz | 2.3 kB | Without provenance | Details for lazylist-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lazylist-0.9.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for lazylist-0.9.0-py2.py3-none-any.whl |
Total release size: 6.2 kB
Release files / lazylist-0.9.0.tar.gz
| Download URL | lazylist-0.9.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bb960f2d39d0e6b274d65738bad3147721906298b1dbe7561158261666c2caa
|
|
BLAKE2b-256 checksum How to use checksums |
3c6584cb36de68ab72059fca33016125cb6a2c1963817e42d0b04643bab21814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / lazylist-0.9.0-py2.py3-none-any.whl
| Download URL | lazylist-0.9.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a04be55176997956387e0705823d822e0031a5d787fb1e792787ed1fd07f5ba6
|
|
BLAKE2b-256 checksum How to use checksums |
75ebdc3c807c2d0638898b3f57d2f57d3c044876ba6548cb66be488d1b0bbee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lazylist 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.