Skip to main content

Priority queue with unique items

Project description

This is a very simple Python class for creating priority queues which maintain unique copies of elements.

This is achieved by storing a separate set of elements that have been inserted and checking each time whether the new elements is in that set or not. An optional key parameter allows to specify a function that will be calculated on each element before checking it against the set.

put() will return True if the element was not present in the queue and False otherwise.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pqunique-0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

pqunique-0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pqunique-0.1.tar.gz.

File metadata

  • Download URL: pqunique-0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pqunique-0.1.tar.gz
Algorithm Hash digest
SHA256 252e84588f22a89b5edfd330e08032c83eff14e2dea8c9934f4f51927a847ea9
MD5 98919a12c19c88701f93df27f7a460a7
BLAKE2b-256 c04b5cb5b8ed562bc574a660c234489fcc24b6e64802171e01c14996c35e836e

See more details on using hashes here.

File details

Details for the file pqunique-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pqunique-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d967e37ad48a3ccb49f3024fd870c2895c5e5f57cac0c1fb1d65d358ce33cc2a
MD5 013c7b9ac9a2be86f1662c6a96fa0dd7
BLAKE2b-256 b68186d33560b02304b779b0ef43fca7023a675622e7c6198f80dadeebc836cb

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