[issue12318] list + tuple inconsistency

2011-06-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes, this is the expected behavior and yes, it is inconsistent. It's been that way for a long while and Guido said he wouldn't do it again (it's in his list of regrets). However, we're not going to break code by changing it (list.__iadd__ working like lis

[issue12318] list + tuple inconsistency

2011-06-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Obviously first sentence should be "You can't do this:". -- ___ Python tracker ___ ___ Python-b

[issue12318] list + tuple inconsistency

2011-06-11 Thread Filip Gruszczyński
New submission from Filip Gruszczyński : You can do this: >>> [1] + (1,) Traceback (most recent call last): File "", line 1, in 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