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.4.tar.gz (6.9 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.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: proxyorderedset-0.3.4.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.4.tar.gz
Algorithm Hash digest
SHA256 0429a9779b392c7e18f1fd9ae237ab5c4dc9c54985ca919adef1e97954eadb2e
MD5 260716818da587f6b3d7c6ecf62f2bf6
BLAKE2b-256 f4f413d309ea44b6b3f3008374a654a1677f28a696928bb556a2b6b418623f72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for proxyorderedset-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3f85775fdfdb7a6e4618fc1b677151b0eb1e34383ad587b87b906eccbe2f0c
MD5 3e2514393d629f40f2c56d7d8402b002
BLAKE2b-256 21602e8ac3bbd9321b8e3bea32eb3ab63547c69ee5988d5426cb90c3e053bac5

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