Hi,

a general question. Consider:

class A(list):
    def __setitem__(self, index, item):
        # do something with index and item
        return list.__setitem__(self, index, item)

lst = A([1,set()])

lst[0] |= 1

lst[1] |= set([1])

Do we want lst.__setitem__ to be called in the second inplace assignment?

A case where this matters is here: http://python.org/sf/1306777

Reinhold

-- 
Mail address is perfectly valid!

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to