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

2013-10-07 Thread shishkander
shishkander added the comment: @grahamd Well, I read the PEP for weakproxy and python doc on weakref library, and I got an impression that weakproxy is really like a weak pointer in C++: i can pass it around as it was a strong pointer, and get an exception if actual object has been deleted

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

2013-10-07 Thread shishkander
shishkander added the comment: @grahamd In short, instead of this: $ python t.py => => I expected to get this (note the second line): => => I pass the proxy to the test() function, and I expect the argument inside the function to be a proxy. And that works - the type of

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

2013-10-06 Thread shishkander
shishkander added the comment: This bug happens not just with operators, but with any call self.call_something()! For example, running this: from __future__ import print_function import weakref class Test(object): def method(self): return type(self) def