Jaymon / captain

command line python scripts for humans
MIT License
13 stars 1 forks source link

Output.pluralize method #71

Closed Jaymon closed 1 year ago

Jaymon commented 1 year ago

It would be nice to do something like this:

output.pluralize(1, "message", "messages") # 1 message

output.pluralize(10, "message", "messages") # 10 messages

And it would have a signature like:

def pluralize(count, single, multiple, format_str="{} {}")