[docs] [issue21611] int() docstring - unclear what number is
report at bugs.python.org
Mon Jun 2 00:38:44 CEST 2014
Raymond Hettinger added the comment:
> I think there should be a precise definition of what is
> considered to be a number there.
Sometimes "precise" definitions make the docs harder to use rather than easier. It is the goal of these docs to basically tell what int() does, not to provide a spec for it.
For most users for the past 20+ years, what we already have was sufficient for them to understand that int('42') returned the integer 42 and that int('xyz') did not have a valid interpretation as an integer.
FWIW, there are other parts of the docs that do have more precise specs about precisely specifies what can go in floats, identifiers, etc. Those parts of the docs are rarely used or read however, because what we have gets the job done reasonably well.
For comparison look at the docs in other languages where the descriptions tend to be more much pithy, leaving intelligent people to fill in the blanks in a reasonable way.
Python tracker <report at bugs.python.org>
More information about the docs