Skip to main content

A range which automatically deals with either direction.

Project description

Better Range

A range which automatically deals with either direction.

Installation

pip install brange

Usage

Start is always inclusive and end is always exclusive. Step must be a positive integer, as it always steps toward the end. A negative value will result in an empty range.

from brange import brange

# This will create a list between 10 (inclusive) and -40 (exclusive)
# [10, 11, 12, ... -37, -38, -39]
[i for i in brange(10, -40)]

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

brange-1.0.2.tar.gz (1.5 kB view hashes)

Uploaded Source

Built Distribution

brange-1.0.2-py3-none-any.whl (1.7 kB view hashes)

Uploaded Python 3

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