Skip to main content

License: Your choice of MIT or Apache License 2.0

Rationale

Python Sets are nice to work with, but very inefficient if you need a large set with mostly-consecutive integers. The RangeSet class provides efficient handling and storage for these sets.

Non-integers?

RangeSet works with any class whose instances are

  • comparable

  • step-able, i.e. you can add 1 to them / subtract 1 from them.

  • discrete, i.e. there is no value between n and n+1.

RangeSet doesn’t add or subtract any other values, nor does it try to subtract two instances from each other.

The requirement to subtract 1 is an optimization that could be removed if necessary.

Metadata

Release files for range-set 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for range-set 0.3.3
File Size Uploaded
range_set-0.3.3.tar.gz 23.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for range-set 0.3.3
File Interpreter ABI Platform
range_set-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 34.0 kB

Release files / range_set-0.3.3.tar.gz

Download URL range_set-0.3.3.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4d8cb72c2abfd7aab6ac00730020a204d633d29f1ed7ea32d52531108e52bcfd
BLAKE2b-256 checksum
How to use checksums
640a73670a9e60946a5295ea3137eb09f745d1bdfb9f3683b64968e6251563bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / range_set-0.3.3-py3-none-any.whl

Download URL range_set-0.3.3-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eebfd08740dc6c2ff5d88a68d10ef130a809054f4d3cc10a0d696d63e03c755
BLAKE2b-256 checksum
How to use checksums
a4bf43e2860057d58a7de94fd6e161cde2f627edb4cfc126a5d4500c6a62bfdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page