Skip to main content

A simple implementation of ordered sets as a proxy to Python's standard dict class.

Project description

(Proxy-) OrderedSet

A simple implementation of ordered sets as a proxy to Python's standard dict class.

The implementation is based on the idea to take a base iterable and create a dict using dict.fromkeys(base). Keys are unique, and in newer versions of Python, the order is kept; values are None and ignored.

This package has no external dependencies. The OrderedSet class overwrites all set methods.

Example

from orderedset import OrderedSet

s: OrderedSet[int] = OrderedSet([3, 1, 4, 1])
list(s)  # yields [3, 1, 4]

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

proxyorderedset-0.3.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

proxyorderedset-0.3.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file proxyorderedset-0.3.2.tar.gz.

File metadata

  • Download URL: proxyorderedset-0.3.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.11

File hashes

Hashes for proxyorderedset-0.3.2.tar.gz
Algorithm Hash digest
SHA256 f232a6a80bc4af0318c1d2b701293d49eb09a396f645731f681716075523ccb7
MD5 e87d4e311570b6be1fc11c56ecf82730
BLAKE2b-256 38651fa52a8faf6eb9918ed855abda9d6a36663c690a1b285a5e17a3ed9def0d

See more details on using hashes here.

File details

Details for the file proxyorderedset-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for proxyorderedset-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ccb05f8f196092e034c74d7f046a9655a922a4f0dd5038255cc22853f8f3aeb9
MD5 4f27e269f94c8ae937dcd140dfe8da8c
BLAKE2b-256 5d32083d4ee46c9027c560decdffb3fdfd3f65643417f396cfe6fab570745d39

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