-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
number_to_words: support for custom comma-separators is broken/incomplete #176
Comments
There could be a few ways in which this behaviour is odd/broken at the moment - here's one example (from exploratory extension of the existing test cases): >>> import inflect
>>> e = inflect.engine()
>>> e.number_to_words(1000.3, threshold=500, comma="_") == "1_000.3"
False
>>> e.number_to_words(1000.3, threshold=500, comma="_")
'1,000.3' |
(also to note: |
Short-term, I think it may make sense to deprecate and/or remove the Arguably that imposes a potential unnecessary performance overhead -- but at the moment I don't think that the method is particularly highly performance-optimized. It should be possible to improve on that after some refactoring, and at that point it may make sense to reconsider and re-introduce the |
Thanks for the investigation. I'm totally fine with deprecating+removing the parameter. |
Discovered while refactoring the
number_to_words
method, as part of reducing complexity of the package in #174:Using a custom
comma
argument tonumber_to_words
appears to be supported based on the docstrings, and that would match the corresponding documentation for theEN::Inflect
CPAN module 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.The text was updated successfully, but these errors were encountered: