On Tue, 05 Jan 2010 00:52:56 +0000, r0g wrote:

> I'd be strongly inclined to think the result would be the sequence on
> the left with the data from the second sequence appended to it. What's
> wrong with a little duck typing here eh?

That's not the existing behaviour. List concatenation doesn't mutate the 
left hand list, it creates a new list:


>>> L = [1, 2, 3]
>>> L2 = L + [4, 5, 6]
>>> L
[1, 2, 3]
>>> L2
[1, 2, 3, 4, 5, 6]


But if you insist on in-place modification, why do you prefer appending 
the right hand sequence to the left instead of prepending the left hand 
sequence to the right?



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to