This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2017年07月28日 16:03 by Stefan Pochmann, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 2957 | merged | serhiy.storchaka, 2017年07月31日 10:31 | |
| PR 2991 | merged | serhiy.storchaka, 2017年08月03日 08:40 | |
| Messages (4) | |||
|---|---|---|---|
| msg299402 - (view) | Author: Stefan Pochmann (Stefan Pochmann) * | Date: 2017年07月28日 16:03 | |
Python 3.6 makes it sound like maps aren't iterable: >>> map(str, *map(int, [[]])) Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> map(str, *map(int, [[]])) TypeError: type object argument after * must be an iterable, not map More, including a likely explanation, in my question and its answer here: https://stackoverflow.com/q/45363330/1672429 Apparently the TypeError from int([]) gets mistaken for a TypeError indicating non-iterability of the map object. |
|||
| msg299411 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2017年07月28日 17:07 | |
Thanks for the report. Retitling because this has nothing to do with map:
>>> def foo(*args):
... raise TypeError('fake')
... yield 1
...
>>> foo(1, *foo())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: foo() argument after * must be an iterable, not generator
>>> foo(*foo())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in foo
TypeError: fake
|
|||
| msg299690 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年08月03日 08:37 | |
New changeset 25e4f779d7ae9f37a1933cb5cbfad06e673c01f9 by Serhiy Storchaka in branch 'master': bpo-31071: Avoid masking original TypeError in call with * unpacking (#2957) https://github.com/python/cpython/commit/25e4f779d7ae9f37a1933cb5cbfad06e673c01f9 |
|||
| msg299694 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年08月03日 09:14 | |
New changeset 946a0b69e217ff22a6c056047eab42053e9a2d5f by Serhiy Storchaka in branch '3.6': [3.6] bpo-31071: Avoid masking original TypeError in call with * unpacking (GH-2957) (#2991) https://github.com/python/cpython/commit/946a0b69e217ff22a6c056047eab42053e9a2d5f |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:49 | admin | set | github: 75254 |
| 2017年08月03日 09:18:25 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017年08月03日 09:14:37 | serhiy.storchaka | set | messages: + msg299694 |
| 2017年08月03日 08:40:10 | serhiy.storchaka | set | pull_requests: + pull_request3030 |
| 2017年08月03日 08:37:19 | serhiy.storchaka | set | messages: + msg299690 |
| 2017年07月31日 10:32:38 | serhiy.storchaka | set | assignee: serhiy.storchaka nosy: + serhiy.storchaka components: + Interpreter Core stage: needs patch -> patch review |
| 2017年07月31日 10:31:51 | serhiy.storchaka | set | pull_requests: + pull_request3005 |
| 2017年07月28日 17:07:53 | r.david.murray | set | nosy:
+ r.david.murray title: Bad error message about maps not iterable -> *args unpacking can mask TypeErrors messages: + msg299411 versions: + Python 3.7 stage: needs patch |
| 2017年07月28日 16:03:22 | Stefan Pochmann | create | |