Skip to content

[Feature Request] Could pluralize be dynamic based on a count argument? #58

Open
@bastienboutonnet

Description

I was wondering if there would be a case for having a version of pluralize() that could automatically decide on whether to pluralise things based on a count similar to what the inflect package does. Their API looks like this:

import inflect
p = inflect.engine()
number_of_cats = 3
print(f"I have {number_of_cats} {p.plural('cat',number_of_cats)}")

Looking at the code, I think it'd be an easy change or addition if you would rather keep pluralize() to only do plural and we could find a more generic name which could be number_agreement() or whaetever we can come up with.

I'd be more than happy to contribute to the feature if this change was welcome.

I really like your package better than inflect and would rather not add a new dependency into my tools or implement this decision every time from "scratch" in my code.

Let me know what you think.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions