[New-bugs-announce] [issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

Eli_B report at bugs.python.org
Wed May 24 08:38:00 EDT 2017


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 at python
components: Documentation
files: 2to3.rst
messages: 294351
nosy: Eli_B, docs at 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 <report at bugs.python.org>
<http://bugs.python.org/issue30456>
_______________________________________


More information about the New-bugs-announce mailing list