A lightweight do-while loop implementation for Python
Project description
pydo-while
A lightweight implementation of a do-while loop for Python.
Installation
pip install pydo-while
Example
from pydo_while import do_while
count = 0
def action():
global count
count += 1
print(count)
return count
do_while(action, lambda n: n < 5)
Output:
1
2
3
4
5
API
do_while(action, condition)
Runs action() once, then continues while:
condition(result)
returns True.
Help
from pydo_while import show_help
show_help()
License
MIT
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
pydo_while-0.1.0.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 pydo_while-0.1.0.tar.gz.
File metadata
- Download URL: pydo_while-0.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a2f524539c1555a98646a6f7ea4b6ec44908a9ae1c7da5aaeb439d7cf6ac4b
|
|
| MD5 |
bd06d8e42ecead9d856cb132f87aeede
|
|
| BLAKE2b-256 |
9d54b068bb7f230a14f2c08ae4c03d21463d688724ab181f5e277a62d74b0b6a
|
File details
Details for the file pydo_while-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pydo_while-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44f106ec0158be353254399f707eabaf417a241c2a46dc29dff71722f66f3857
|
|
| MD5 |
40a92ad19c35a49913803b03b6a88edc
|
|
| BLAKE2b-256 |
2eead80251bddb68f7afc7a5d4bb1efadbfe6b7f4a0393be7449e5a4bf733644
|