Mark Dickinson added the comment:

The patch looks okay to me.

What does inheriting from 'ref' buy you?  This feels a bit strange to me: the 
way I think of it, the WeakMethod *has* a weakref to the underlying object, 
rather than *being* a weakref to the underlying object.  The __repr__ also 
seems a bit misleading as a result:

>>> o = Object()
>>> m = o.some_method
>>> WeakMethod(m)
<weakref at 0x100665ae0; to 'Object' at 0x101115840>


Python tracker <>
Python-bugs-list mailing list

Reply via email to