Skip to main content

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

Project details


Download files

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

Source Distribution

cs.range-20150116.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file cs.range-20150116.tar.gz.

File metadata

  • Download URL: cs.range-20150116.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cs.range-20150116.tar.gz
Algorithm Hash digest
SHA256 5dbcb3b587a6f793ee59c1bbe35b0331e67e62d6991c4e0d9838773330ba63d9
MD5 a001cc37a453ddd192a20874352e2474
BLAKE2b-256 e0a5081332ed0f9839ecba92ff0935409f4b6a2586d077a013af1acaf2f7a8df

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