weak reference to bound method

Peter Otten __peter__ at web.de
Fri Oct 2 08:11:42 EDT 2009


Ole Streicher wrote:

> Hello Peter,
> 
> Peter Otten <__peter__ at web.de> writes:
>>> What I want is to have a universal class that "always" works: with
>>> unbound functions, with bound function, with lambda expressions, with
>>> locally defined functions,
> 
>> That's left as an exercise to the reader ;)
> 
> Do you have the feeling that there exists any reader that is able to
> solve this exercise? :-)

I was thinking of you.

> I am a bit surprised that already such a simple problem is virtually
> unsolvable in python. Do you think that my concept of having a DoAsync
> class is wrong?

I don't understand the example you give in the other post. 

If you are trying to use reference counting as a means of inter-thread 
communication, then yes, I think that's a bad idea.




More information about the Python-list mailing list