🔢 Simple universal word pluralizer 🔢
Project description
plur: 🔢 simple universal word pluralizer 🔢
Tired of seeing 1 branch(es) deleted?
Sick of
es = '' if len(branches) == 1 else 'es'
print(f'{len(branches) branch{es} created')
or even worse?
Try plur for your tiny pluralization needs:
import plur
print(plur('branch', '-es'), branches), 'created)
- No dictionary file!
- No dependencies!
- No salesperson will call!
Examples:
import plur
dogs = ['fido', 'rover']
print(plur('dog', dogs)) # prints: 2 dogs
dogs.pop()
print(plur('dog', dogs)) # prints: 1 dog
dogs.pop()
print(plur('dog', dogs)) # prints: 0 dogs
# Great for f-strings
dogs = 'fido', 'rover'
print(f'Today we have {plur("dog", dogs)}')
For words you use a lot, you can defer operation:
dog = plur('dog')
cat = plur('cat')
ox = plur('ox', '-en')
print(dog(dogs), 'live in my house with', ox(ox_list))
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
plur-1.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
plur-1.1.0-py3-none-any.whl
(2.3 kB
view details)
File details
Details for the file plur-1.1.0.tar.gz.
File metadata
- Download URL: plur-1.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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 |
e28eaaef0cac8211b2b729bb27d30431adfd0a9c86b84d0d498fd365a78cfc29
|
|
| MD5 |
d37c44f138294a5ca4ffa6bb028bcd48
|
|
| BLAKE2b-256 |
9f8f4fa944a6481e1f394057c00ff63a03ac24108c49a30c76dac9d183cfb563
|
File details
Details for the file plur-1.1.0-py3-none-any.whl.
File metadata
- Download URL: plur-1.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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 |
283fee5ca6097fb77018649246ad15f15e2be92fe048db1c40ef43bf024a80fe
|
|
| MD5 |
3bed1b05916b099ebcab3fbcbe8c36ca
|
|
| BLAKE2b-256 |
073886cff9dbbc850a235633c9b2e93e6d5125c08e16d5afa65f7525ddebf237
|