jaraco / jaraco/inflect

number_to_words: support for custom comma-separators is broken/incomplete

Open
#176 4 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
Python
Stars
1.1k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

Discovered while refactoring the [`number_to_words` method](https://github.com/jaraco/inflect/blob/cd7142ff757b40bf93ad0e4389ab62988ee48b88/inflect/__init__.py#L3790-L3938), as part of reducing complexity of the package in #174:

Using a custom `comma` argument to `number_to_words` appears to be supported based on the docstrings, and that would match the corresponding documentation for the [`EN::Inflect` CPAN module](https://metacpan.org/pod/Lingua::EN::Inflect) that this library is based on.

However: in practice it seems that providing a `comma` argument (other than the default `,`) does not work as expected.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the number_to_words method in inflect/__init__.py, especially the implementation linked in the issue, and compare its behavior with the method's docstrings and the referenced Lingua::EN::Inflect documentation. Reproduce a call using a non-default comma argument, then add coverage demonstrating the documented separator behavior and confirming it works as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.