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 2009年12月19日 19:26 by eggy, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg96642 - (view) | Author: Mark Florisson (eggy) * | Date: 2009年12月19日 19:26 | |
>>> list(*('boo' for x in [1]))
['b', 'o', 'o']
>>> list(*(range('error') for x in [1])) # notice the erroneous error
message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: type object argument after * must be a sequence, not
generator
>>> list(*[range('error') for x in [1]])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: range() integer end argument expected, got str.
>>> list(*(int('error') for x in [1])) # does work correctly for
ValueError
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <genexpr>
ValueError: invalid literal for int() with base 10: 'error'
|
|||
| msg96997 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2009年12月29日 16:41 | |
This is a duplicate of issue4806. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:55 | admin | set | github: 51797 |
| 2009年12月29日 16:41:47 | amaury.forgeotdarc | set | status: open -> closed nosy: + amaury.forgeotdarc messages: + msg96997 superseder: Function calls taking a generator as star argument can mask TypeErrors in the generator resolution: duplicate |
| 2009年12月19日 19:26:12 | eggy | create | |