You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use humanize to convert 10_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000 (1 Googol) to the text output “1 googol” by calling humanize.intword() with the number.
What did you expect to happen?
I expected the text output to be “1 googol” as the documentation for intword claims the library can handle numbers of this size.
What actually happened?
The output was just the number as a string, without any word at all: '10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
This is also the case for numbers larger than 1 Googol.
What versions are you using?
OS: Windows 11 Pro 22H2 22621.1992
Python: Python 3.11.4 (also tried 3.10.11, 3.9.13, 3.8.10, and 3.7.9)
The fact that it doesn't seem to work in any Python versions going all the way back to 3.8 in humanize v4.7.0 (and Python 3.7 with v4.6.0) seems odd to me. It leads me to believe that either I am misunderstanding the documentation, I am using the library wrongly, or something is wrong with how humanize handles a Googol.
If humanize is not supposed to parse a googol to the string “1 googol”, the docs should be updated to reflect that. Currently, they state:
Supports up to decillion (33 digits) and googol (100 digits).
Which I understood meaning “Can parse and display a googol”.
My apologies if the problem turns out to be me misunderstanding/-using.
The text was updated successfully, but these errors were encountered:
At first glance, the docstring and constants have been in the codebase for 12 years (0cf1199), but there's no test for googol, so sounds like a bug/regression.
Possibly related to #87 (released in 4.5.0), see also #91.
What did you do?
I tried to use humanize to convert
10_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000
(1 Googol) to the text output “1 googol” by callinghumanize.intword()
with the number.What did you expect to happen?
I expected the text output to be “1 googol” as the documentation for intword claims the library can handle numbers of this size.
What actually happened?
The output was just the number as a string, without any word at all:
'10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
This is also the case for numbers larger than 1 Googol.
What versions are you using?
Please include code that reproduces the issue.
The best reproductions are self-contained scripts with minimal dependencies.
The fact that it doesn't seem to work in any Python versions going all the way back to 3.8 in humanize v4.7.0 (and Python 3.7 with v4.6.0) seems odd to me. It leads me to believe that either I am misunderstanding the documentation, I am using the library wrongly, or something is wrong with how humanize handles a Googol.
If humanize is not supposed to parse a googol to the string “1 googol”, the docs should be updated to reflect that. Currently, they state:
My apologies if the problem turns out to be me misunderstanding/-using.
The text was updated successfully, but these errors were encountered: