On 01/12/15 21:37, Denis McMahon wrote:
The assignment succeeds. That's imo a bug. If it's a TypeError to try and
assign a value to tup[1], then tup[1] should not allow the mutated list
to be assigned.

Nothing got assigned.

That original list object remains in that slot. However, it has been mutated since it was originally assigned.

But I can see what you're getting at - what you're asking for is that the *container* object whose element is being assigned to is first queried as to whether it will accept a mutated element being assigned to it before that element is mutated.

This looks to be a fundamental issue with the augmented assignment mechanism.

E.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to