Issue 30456: 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses
Created on 2017-05-24 12:38 by Eli_B, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| 2to3.rst | Eli_B, 2017-05-24 12:37 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1699 | merged | Eli_B, 2017-05-24 12:37 | |
| PR 4531 | merged | berker.peksag, 2017-11-23 20:21 | |
| Messages (4) | |||
|---|---|---|---|
| msg294351 - (view) | Author: Eli_B (Eli_B) * | Date: 2017-05-24 12:37 | |
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)). " |
|||
| msg298923 - (view) | Author: Berker Peksag (berker.peksag) * ![]() |
Date: 2017-07-24 00:39 | |
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/26248ef58dcf49619930ffa2e050ffa687a88601 |
|||
| msg306857 - (view) | Author: Berker Peksag (berker.peksag) * ![]() |
Date: 2017-11-23 20:27 | |
New changeset a645b23ffc76073a2eb4e77b88cb7648cfc6ef77 by Berker Peksag in branch '3.6': bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699) https://github.com/python/cpython/commit/a645b23ffc76073a2eb4e77b88cb7648cfc6ef77 |
|||
| msg306858 - (view) | Author: Berker Peksag (berker.peksag) * ![]() |
Date: 2017-11-23 20:28 | |
Looks like I forgot to backport this 3.6 branch. Now it's done. Thanks, Eli. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:46 | admin | set | github: 74641 |
| 2017-11-23 20:28:32 | berker.peksag | set | status: open -> closed versions: - Python 2.7, Python 3.5 messages: + msg306858 resolution: fixed |
| 2017-11-23 20:27:27 | berker.peksag | set | messages: + msg306857 |
| 2017-11-23 20:21:40 | berker.peksag | set | keywords:
+ patch stage: backport needed -> patch review pull_requests: + pull_request4466 |
| 2017-07-24 00:39:49 | berker.peksag | set | stage: backport needed type: behavior versions: + Python 3.5, Python 3.6, Python 3.7 |
| 2017-07-24 00:39:10 | berker.peksag | set | nosy:
+ berker.peksag messages: + msg298923 |
| 2017-05-24 12:38:00 | Eli_B | create | |
