An OrderedSet is a custom MutableSet that remembers its order, so that every entry has an index that can be looked up.
Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger, and released under the MIT license:
Rob Speer’s changes are as follows:
changed the content from a doubly-linked list to a regular Python list. Seriously, who wants O(1) deletes but O(N) lookups by index?
add() returns the index of the added item
index() just returns the index of an item
added a __getstate__ and __setstate__ so it can be pickled
added __getitem__
Metadata
Release files for ordered-set 1.0.1
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 | |
|---|---|---|---|---|
| ordered-set-1.0.1.tar.gz | 2.1 kB | Without provenance | Details |
Release files / ordered-set-1.0.1.tar.gz
| Download URL | ordered-set-1.0.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e946bbb5a689eb5e6f5f1515964e19e5376fde57747767204eb695d9a38ac3c6
|
|
BLAKE2b-256 checksum How to use checksums |
84056b87786d97a542d8029a1e1ef47ba9eee97de5b42c41f601b25fecb24648
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ordered-set 1.0.1
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.