Simple Go lang iota pattern implementation
Project description
PyIota - Simple Go lang iota pattern implementation
Simple Usage
from pyiota import iota
with iota.start():
A = iota()
B = iota()
C = iota()
with iota.start(10):
D = iota()
E = iota()
F = iota()
print(A, B, C, D, E, F) #=> '0 1 2 10 11 12'
How it works?
- Default
iota._countervalue equals to-1. A = iota()-iota.__new__()incrementsiota._counterand returns it.- It is possible to reset
iota._countercallingiota()withinwith iota.start(): ...block.
2.1. You can also provide a number to start from. For example:D,EandFfrom example above will be equal to10,11, and12accrordingly.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 pyiota-1.2.1-py3-none-any.whl.
File metadata
- Download URL: pyiota-1.2.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.63.0 importlib-metadata/5.0.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a1166c23344ca07e55d44e7b4a79052f8b26768d6de6eee26e0a129bc830010
|
|
| MD5 |
110eac4ad7556f1aa8d5ab635d323dfc
|
|
| BLAKE2b-256 |
d177dd52cbcb6d46f9da0fc4ef8d5955aa5ed6f715f5017ab12e61049ac19f50
|