Message138185
You can do this:
>>> [1] + (1,)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "tuple") to list
But you can do this:
>>> result = [1]
>>> result += (1,)
>>> result
[1, 1]
Is it the expected behaviour, that += does implicit coercion? |
|
Date |
User |
Action |
Args |
2011-06-11 22:02:52 | gruszczy | set | recipients:
+ gruszczy |
2011-06-11 22:02:51 | gruszczy | set | messageid: <1307829771.92.0.859008661902.issue12318@psf.upfronthosting.co.za> |
2011-06-11 22:02:51 | gruszczy | link | issue12318 messages |
2011-06-11 22:02:51 | gruszczy | create | |
|