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.3.tar.gz (6.8 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.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: proxyorderedset-0.3.3.tar.gz
  • Upload date:
  • Size: 6.8 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.3.tar.gz
Algorithm Hash digest
SHA256 c9718f2dbd7b961f9465f7d4435ca3abab82455de2d4dc9bdab2d5956fd37be3
MD5 1586c836af6b900888a16314113c1a87
BLAKE2b-256 6cc205e2771a227357193050965607e5d3a31399639ff3e477d182f7ef39f402

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for proxyorderedset-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0e65de9832d9a0e68c6079dae47a46b17fc00f4c600c9bf68806bf5efbd755f
MD5 8d470f681727b5c61d41c110a6b3765e
BLAKE2b-256 036e084d3621b5162349ebee08cb13b05a7f3e9c294b5260ae64cc280a3f9db9

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