This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Sets of integers like 1,3-7,33

Project Description

intspan is a set subclass that conveniently represents sets of integers. Sets can be created from, and displayedm 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.

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.

Release History

Release History

This version
History Node

1.5.10

History Node

1.5.9

History Node

1.5.8

History Node

1.5.7

History Node

1.5.6

History Node

1.5.5

History Node

1.5.4

History Node

1.5.3

History Node

1.5.2

History Node

1.5.1

History Node

1.5.0

History Node

1.4.4

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.4.0

History Node

1.3.10

History Node

1.3.9

History Node

1.3.8

History Node

1.3.7

History Node

1.3.6

History Node

1.3.5

History Node

1.3.4

History Node

1.3.3

History Node

1.3.2

History Node

1.3.1

History Node

1.3.0

History Node

1.2.6

History Node

1.2.5

History Node

1.2.4

History Node

1.2.3

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
intspan-1.5.10-py2.py3-none-any.whl (8.9 kB) Copy SHA256 Checksum SHA256 3.6 Wheel May 30, 2017
intspan-1.5.10.zip (17.1 kB) Copy SHA256 Checksum SHA256 Source May 30, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting