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.2.0.tar.gz
(1.6 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.2.0.tar.gz.
File metadata
- Download URL: make_slice-0.2.0.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Linux/6.11.0-1014-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57b68e3ef20ea67894860a8ba1a14a41140c566fd2b00da8bd29c260e22cc10d
|
|
| MD5 |
52a32695ac3842a28bb5c5ea6e55da34
|
|
| BLAKE2b-256 |
d6015cdfbf1d94565bc393aebacade01ac8298c9b32f6cc28e6fd097c5f4f73c
|
File details
Details for the file make_slice-0.2.0-py3-none-any.whl.
File metadata
- Download URL: make_slice-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Linux/6.11.0-1014-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd402dcfeb357cc471fa2cb7b7f75254b51b0d01a2cf8af470c4a62ced8d14b
|
|
| MD5 |
e72a0bb4dd6eb299457ea51bae943c7a
|
|
| BLAKE2b-256 |
73e2b7ffb362a754c81fb934f240b758b021f1ed113612f8896f6450ea293aef
|