[issue19070] In place operators of weakref.proxy() not returning self.

Nick Coghlan report at bugs.python.org
Sun Sep 22 13:23:57 CEST 2013


Nick Coghlan added the comment:

Ouch :P

Perhaps the least-incompatible fix would be to switch to returning the proxy if the object returned is the proxied object (which would do the right thing for proxies to mutable objects), while preserving the current behaviour when the in-place operation returns a new object?

That behaviour is still somewhat broken, but there's no obviously non-broken behaviour in that case, and this broadly preserves compatibility with the status quo.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19070>
_______________________________________


More information about the Python-bugs-list mailing list