[issue36100] Document the differences between str.isdigit, isdecimal and isnumeric
Steven D'Aprano
report at bugs.python.org
Sun Feb 24 08:32:58 EST 2019
Steven D'Aprano <steve+python at pearwood.info> added the comment:
I'm re-opening the ticket with a change of subject, because I think this should be treated as a documentation enhancement:
- improve the docstrings for str.isdigit, isnumeric and isdecimal to make it clear what each does (e.g. what counts as a digit);
- similarly improve the documentation for int and float? although the existing comment may be sufficient
https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex
- add a FAQ summarizing the situation.
I don't think we need to worry about backporting the docs to Python 2, but if others disagree, I won't object.
----------
assignee: -> docs at python
components: +Documentation -Library (Lib)
nosy: +docs at python
resolution: not a bug ->
stage: resolved ->
status: closed -> open
title: int() and float() should accept any isnumeric() digit -> Document the differences between str.isdigit, isdecimal and isnumeric
type: behavior -> enhancement
versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36100>
_______________________________________
More information about the Python-bugs-list
mailing list