[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses
New submission from Eli_B:
The documentation says isinstance(x, (int, int)) would be fixed to isinstance(x, (int)). The fix is actually isinstance(x, int).
I propose the following text instead:
"
2to3fixer:: isinstance
Fixes duplicate types in the second argument of :func:`isinstance`. For example, isinstance(x, (int, int)) is converted to isinstance(x, int) and isinstance(x, (int, float, int)) is converted to isinstance(x, (int, float)).
"
----------
assignee: docs@python
components: Documentation
files: 2to3.rst
messages: 294351
nosy: Eli_B, docs@python
priority: normal
pull_requests: 1867
severity: normal
status: open
title: 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses
versions: Python 2.7
Added file: http://bugs.python.org/file46894/2to3.rst
_______________________________________
Python tracker
Berker Peksag added the comment:
New changeset 26248ef58dcf49619930ffa2e050ffa687a88601 by Berker Peksag (Eli Boyarski) in branch 'master':
bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699)
https://github.com/python/cpython/commit/26248ef58dcf49619930ffa2e050ffa687a...
----------
nosy: +berker.peksag
_______________________________________
Python tracker
Changes by Berker Peksag
Change by Berker Peksag
Berker Peksag
Berker Peksag
participants (2)
-
Berker Peksag
-
Eli_B