[docs] [issue14783] Make int() and str() docstrings correct

Ezio Melotti report at bugs.python.org
Wed Sep 19 09:58:09 CEST 2012


Ezio Melotti added the comment:

> First argument is named "x".

Sometimes the doc uses "better" names to improve clarity when the argument is not supposed to be called as keyword arg.

> Here can be not only string, but bytes or bytearray.

The same applies here.  "string" is also used in the error message (int() can't convert non-string with explicit base).  If bytes/bytearrays are accepted too it could be mentioned later in the prose.

Otherwise we could use x for both, but the distinction would be less clear.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14783>
_______________________________________


More information about the docs mailing list