Design thought for callbacks
Marko Rauhamaa
marko at pacujo.net
Sun Feb 22 07:12:52 EST 2015
Cem Karan <cfkaran2 at gmail.com>:
> On Feb 21, 2015, at 11:03 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> I use callbacks all the time but haven't had any problems with strong
>> references.
>>
>> I am careful to move my objects to a zombie state after they're done so
>> they can absorb any potential loose callbacks that are lingering in the
>> system.
>
> So, if I were designing a library for you, you would be willing to have
> a 'zombie' attribute on your callback, correct? This would allow the
> library to query its callbacks to ensure that only 'live' callbacks are
> called. How would you handle closures?
Sorry, don't understand the question.
Marko
More information about the Python-list
mailing list