Creates slice objects with clean syntax.
Project description
make-slice
Creates slice objects with clean syntax.
Install
pip install make-slice
Usage
from make_slice import make_slice
# Create a slice object
s = make_slice[1:10:2] # Equivalent to slice(1, 10, 2)
# Use the slice object
my_list = list(range(20))
print(my_list[s]) # Output: [1, 3, 5, 7, 9]
License
MIT License - See LICENSE for details.
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
make_slice-0.1.4.tar.gz
(1.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file make_slice-0.1.4.tar.gz.
File metadata
- Download URL: make_slice-0.1.4.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-60-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c13e1a4ebb19054cea7bd0427ffa76f7e610f7cec60c695651c59b260421cca
|
|
| MD5 |
8d3c89105991e3b985cf0a9d336a1c43
|
|
| BLAKE2b-256 |
275bd65e1d8ab00c30ec2c7b49cafd9c1a594a3222bab2c4d29048bd96ef1d1d
|
File details
Details for the file make_slice-0.1.4-py3-none-any.whl.
File metadata
- Download URL: make_slice-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-60-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d001874966334ef85ba075032a6ed0d1cf973503ed50ad6dc61ca6b83f7850
|
|
| MD5 |
f3302202d1fc3184e7613537b9d860b9
|
|
| BLAKE2b-256 |
01ae0172c0bddcdf437c9abf4c2ba43305cf229646f005cc74e0bf241e09dd50
|