do-while
making poor life choices for conference talks
Install
$ pip install do-while
Usage
Do a do-while loop:
from do_while import do, while_
queue = [1, 2, 3]
@do
def loop():
item = queue.pop()
print(item)
while_(queue)
# 1
# 2
# 3
Do an until loop:
from do_while import until
k = 0
@until(lambda: k > 4)
def loop():
nonlocal k
print(k)
k += 1
# 0
# 1
# 2
# 3
# 4
License
do-while is copyright Amethyst Reese, and licensed under the MIT license.
Metadata
Release files for do-while 4.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| do_while-4.2.7.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| do_while-4.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / do_while-4.2.7.tar.gz
| Download URL | do_while-4.2.7.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2367645dd6c086ac207d6aa0010c8d61e000ff365c8016ea5461041cf352d78
|
|
BLAKE2b-256 checksum How to use checksums |
95276dab971b4e2f05f896c7d7a4594de8356944bb9238ff305fd4efb97d50b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Release files / do_while-4.2.7-py3-none-any.whl
| Download URL | do_while-4.2.7-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09aef3bc132a02d74eddac007188976f87bb6be4c08cc796a102a4a395f115d6
|
|
BLAKE2b-256 checksum How to use checksums |
80bae65c09a0ea44f5faa752660374cd7dec476ae2260ebef05c5f6f8e18a442
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|