On 11/4/2012 7:45 AM, Dave Angel wrote:

What I wonder about is why list's __add__  is so fussy.

Guido's reason is that it is not clear what the types of [1,2] + (3,4), (1,2) + [3,4], [] + range(4), range(2) + [3,4], etcetera should be. Such mixtures may be bugs. Seq.__add__ exists to implement '+'.

[].extend() will clearly be a list, and accepts any iterable.

I believe the same logic is used for set operations.

--
Terry Jan Reedy

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

Reply via email to