Message96642
>>> 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' |
|
Date |
User |
Action |
Args |
2009-12-19 19:26:13 | eggy | set | recipients:
+ eggy |
2009-12-19 19:26:13 | eggy | set | messageid: <1261250773.36.0.925954913531.issue7548@psf.upfronthosting.co.za> |
2009-12-19 19:26:11 | eggy | link | issue7548 messages |
2009-12-19 19:26:11 | eggy | create | |
|