A new version of python range
Project description
rangev2
rangev2 is next version of popular range class of python, which enables you to produce lists even by using *,/,// and % operators along with +,- operators.
- The syntax is nearly similar to the privious versions
- Little modification is that step (third parametr) is now string containing operand and operator
- Example :
>>> new_range(8,100,'*9')
>>> [8,72]
New Features!
- print(new_range(begin,end,step)) will now print the entire list
- example
>>> print(new_range(100,1,'//3')
>>> [100, 33, 11, 3]
- the default values for begin and step are 0 and '+1' respectively.
- in operator is overloaded:
>>> 3 in new_range(4)
>>> True.
- the list generated can also be accessed via list argument
- example :
>>> new_range(6).list
>>> [0,1,2,3,4,5]
Installation
pip install rangev2
License
MIT
Contribute
All ways welcome good contributions, keeping the target to make it core functionality of python
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rangev2-0.1.1.tar.gz
(2.7 kB
view details)
File details
Details for the file rangev2-0.1.1.tar.gz.
File metadata
- Download URL: rangev2-0.1.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d79a515be5b03776d14bf8d1b7ed7e92d6f1f3de2bf1a9794bfe6581d592d9b4
|
|
| MD5 |
a37f0e9a4950f8d10dfce1155038586d
|
|
| BLAKE2b-256 |
f0cffccde4a7edd6fabe2649c315789ce65170942516f07de1c43104fd49b24c
|