brange-1.1.0.post1
توضیحات
A range which automatically deals with either direction.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | brange-1.1.0.post1 |
| نام | brange |
| نسخه کتابخانه | 1.1.0.post1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Maximillian Strand |
| ایمیل نویسنده | maximillian.strand@protonmail.com |
| آدرس صفحه اصلی | https://gitlab.com/deepadmax/brange |
| آدرس اینترنتی | https://pypi.org/project/brange/ |
| مجوز | - |
# 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
```py
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
```py
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),
# ]
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl brange-1.1.0.post1:
pip install brange-1.1.0.post1.whl
نصب پکیج tar.gz brange-1.1.0.post1:
pip install brange-1.1.0.post1.tar.gz