Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

a Range class implementing compact integer ranges with a set-like API, and associated functions

Project Description

A Range is used to represent integer ranges, such a file offset spans.

Much of the set API is presented to modify and test Ranges, looking somewhat like sets of intergers but extended slightly to accept ranges as well as individual integers so that one may say “R.add(start, end)” and so forth.

Also provided:

  • Span, a simple start:end range.
  • overlap: return the overlap of two Spans
  • spans: return an iterable of Spans for all contiguous sequences in the ordered integers supplied
Release History

Release History

This version
History Node

20160828

History Node

20150116

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
cs.range-20160828.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Aug 28, 2016

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