Skip to main content

🔢 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plur-1.1.0-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

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

Hashes for plur-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e28eaaef0cac8211b2b729bb27d30431adfd0a9c86b84d0d498fd365a78cfc29
MD5 d37c44f138294a5ca4ffa6bb028bcd48
BLAKE2b-256 9f8f4fa944a6481e1f394057c00ff63a03ac24108c49a30c76dac9d183cfb563

See more details on using hashes here.

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

Hashes for plur-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 283fee5ca6097fb77018649246ad15f15e2be92fe048db1c40ef43bf024a80fe
MD5 3bed1b05916b099ebcab3fbcbe8c36ca
BLAKE2b-256 073886cff9dbbc850a235633c9b2e93e6d5125c08e16d5afa65f7525ddebf237

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page