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.
Regular
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)]
N-dimensional
from brange import nbrange
dimensions = [
(1, 10, 2), # X
(3, -2, 1), # Y
(-2, 5, 1), # Z
]
[xyz for xyz in nbrange(*dimensions)]
# This will result in a list as below:
# [
# (1, 3, -2),
# (1, 3, -1),
# ...
# (9, -1, 2),
# (9, -1, 3),
# (9, -1, 4),
# ]
Metadata
Release files for brange 1.1.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brange-1.1.0.post1.tar.gz | 1.9 kB | Without provenance | Details for brange-1.1.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brange-1.1.0.post1-py3-none-any.whl | Python 3 | none | any | Details for brange-1.1.0.post1-py3-none-any.whl |
Total release size: 4.1 kB
Release files / brange-1.1.0.post1.tar.gz
| Download URL | brange-1.1.0.post1.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7197a31aba8111979ef748563a0cfdd17bd78fa17b34f801e15312177f8077d2
|
|
BLAKE2b-256 checksum How to use checksums |
3554c41c5b53ff4e34cd3fb078b9afe60828c68d958d4ee98ae19cd75c70ead6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.6 Linux/5.10.59-1-MANJARO
|
Release files / brange-1.1.0.post1-py3-none-any.whl
| Download URL | brange-1.1.0.post1-py3-none-any.whl |
|---|---|
| Size | 2.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0d285d68a157d8fb96b1c507760951cefe399f2b3b53de4a4b858d6c35c6ddd
|
|
BLAKE2b-256 checksum How to use checksums |
1e060b32fae50fe61b834a51082f06459284438d1eab8672997a25355fd5750c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.6 Linux/5.10.59-1-MANJARO
|
Security for brange 1.1.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.