Skip to main content

Range object for any type for Python.

Project description

range-anytype

Usage

This package is using for Range object for any type.

How to use it

import it by: from range_anytype import Range, ProtectedRange. No any additional modules or packages will be installed. If you cannot install it by pip, please download the source and extract it into sys.path.

To see examples, please visit example.py, or type from range_anytype import example.

Range

Create a range for any type that supports addition calculation.

ProtectedRange

Create a range for any type that supports addition and subtraction calculation. This can protect program because it detects the supporting of subtraction of the type. Some types like str, list, tuple, only support addition, not support subtraction.

Cautions

If you are using Python 2.1 or lower, it will import from py1compa.py (means "Python 1's compatible"). If you want to iter the object, please define these functions if the Python version does not have iter or next function:

iter = lambda obj: obj.__iter__()
next = lambda obj: obj.next()

If you are using a long-filename-less supported Microsoft OS(e.g. MS-DOS 5.0), please change the directory name from "range_anytype" to "rangeant".

Download files

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

Source Distribution

range-anytype-0.6.10.923143b0.tar.gz (6.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page