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.5.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for proxyorderedset-0.3.5.tar.gz
Algorithm Hash digest
SHA256 6f54a4c176c680d60d1cd9d521f7d58e87a356fa722e61bc4df595224713cedf
MD5 52322848886a7a8f804dfdbbf3e42104
BLAKE2b-256 701bfbe28b506999cf8389f899564c9d9f6d859a1c0bd4b643e07a90c76000da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for proxyorderedset-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8c123c033ff3bc8003120e5602f31e62c38e13f983f7abb2f4c04ca054fb1413
MD5 4313d9aa4261081f51746b6c2b16770f
BLAKE2b-256 1ade4459a7fef62064be7811fe1ec34b7f0e59826f6cbd6bf7ac6e70542f1e39

See more details on using hashes here.

Supported by

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