Skip to main content

lrange - unlimited xrange in pure Python

Project description

lrange is a lazy range function for Python 2.x or xrange drop-in replacement for long integers.

lrange is a pure Python analog of the builtin range function from Python 3.x.

>>> from lrange import lrange
>>> r = lrange(2**100, 2**101, 2**100)
>>> len(r)
>>> for i in r:
...     print i,
>>> for i in r:
...     print i,
>>> 2**100 in r
>>> r[0], r[-1]
(1267650600228229401496703205376L, 1267650600228229401496703205376L)
>>> L = list(r)
>>> L2 = [1, 2, 3]
>>> L2[:] = r
>>> L == L2 == [2**100]

Files are licensed under the MIT License. See the file MIT-LICENSE.txt for details.

The latest version is at

Project details

Download files

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

Files for lrange, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size lrange-1.0.0-py2.py3-none-any.whl (5.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size lrange-1.0.0.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page