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.0.tar.gz (4.5 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.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for proxyorderedset-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9f14809b11e9e2d511db64199b8161d82cbf5742165eb3c5a8f6868d8bb065d9
MD5 dac25510f1ee6c08cd2ec003dff63040
BLAKE2b-256 f3759e09ed6d15aafbd0176104c1d9fb06be2e0a80a4edeca9c02222115bc203

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for proxyorderedset-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a24a79fdba48e1bbc0ce31f82cec7d87e5109e7ec539acd905b91c0259d6e6cd
MD5 06e2d7ed15bbf878e0d31f83439ece69
BLAKE2b-256 7bcf433d06bfa897e33b535617b7279bac6d6c19d3fc173f00dea014bfc129f5

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