Ronald Oussoren added the comment:

David: your update to the FAQ looks ok to me.


I don't like updating the __setitem__ of tuple to allow setting an identical 
value (that is 'a[0] = a[0]'), it is a bit too magic to my taste and hides the 
real problem.

I'd slightly prefer my idea: update the code generated for += to try performing 
the assignment before calling __iadd__.  I hadn't looked at the AST compiler 
before, but at first glance implementing my idea seems easier than I had 
expected and I'm working on an experimental patch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to