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
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
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