Skip to main content
travisci PyPI Package latest release Supported versions Supported implementations Wheel packaging support Test line coverage Test branch coverage

intspan is a set subclass that conveniently represents sets of integers. Sets can be created from, and displayed as, integer spans such as 1-3,14,29,92-97 rather than exhaustive member listings. Compare:

intspan('1-3,14,29,92-97')
[1, 2, 3, 14, 29, 92, 93, 94, 95, 96, 97]

Or worse, the unsorted, non-intuitive listings that crop up with Python’s native unordered sets, such as:

set([96, 1, 2, 3, 97, 14, 93, 92, 29, 94, 95])

While they all indicate the same values, intspan output is much more compact and comprehensible. It better divulges the contiguous nature of segments of the collection, making it easier for humans to quickly determine the “shape” of the data and ascertain “what’s missing?”

When iterating, pop()-ing an item, or converting to a list, intspan behaves as if it were an ordered–in fact, sorted–collection. A key implication is that, regardless of the order in which items are added, an intspan will always be rendered in the most compact, organized form possible.

The main draw is having a convenient way to specify, manage, and see output in terms of ranges–for example, rows to process in a spreadsheet. It can also help you quickly identify or report which items were not successfully processed in a large dataset.

There is also an ordered intspanlist type that helps specify the ordering of a set of elements.

See the full details on Read the Docs.

Metadata

Release files for intspan 1.6.1

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

Source distribution (sdist)

Source distribution for intspan 1.6.1
File Size Uploaded
intspan-1.6.1.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for intspan 1.6.1
File Interpreter ABI Platform
intspan-1.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / intspan-1.6.1.tar.gz

Download URL intspan-1.6.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2ebefbfeeea9fd07e50e3969671712ed3ade730355d3224a41829fc31f7fc0b2
BLAKE2b-256 checksum
How to use checksums
16494b1bcbd6b257422fe1c9f2fef3e0215b80465a5a1f80434dc8b95e096c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

Release files / intspan-1.6.1-py3-none-any.whl

Download URL intspan-1.6.1-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78ea01107adb4c9b833b707ac3d8aec0ae69ce1cee9362fed6d2a3fb4fef24c7
BLAKE2b-256 checksum
How to use checksums
cbe5f282d2d3a11d6174d9bba02904c67c49e673007d5593ba82d75d8fff5268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files

1.6.0

2 release files

1.5.15

2 release files

1.5.12

1 release file

1.5.11

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

3 release files

1.5.2

2 release files

1.5.1

3 release files

1.5.0

3 release files

1.4.4

3 release files

1.4.3

3 release files

1.4.2

3 release files

1.4.1

3 release files

1.4.0

3 release files

1.3.10

3 release files

1.3.9

3 release files

1.3.8

3 release files

1.3.7

3 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

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