[Twisted-web] liveevil problem: nested functions get lost

Donovan Preston dp at ulaluma.com
Mon Feb 28 09:26:50 MST 2005

On Feb 27, 2005, at 12:55 PM, Federico Di Gregorio wrote:

> Il giorno ven, 25-02-2005 alle 21:47 -0800, noema ha scritto:
>> I think I encountered similar symptoms once and after quite some time 
>> of
>> confusion I concluded that it must have to do with python's garbage
>> collector. It seemed to me that there needs to be something refereced 
>> in
>> the do_something() method to prevent it from being wiped before the 
>> call
>> comes back from the client.
> That's why if you use "identifier" the handler is managed in a 
> different
> way (using events instead of reflect) and keeps a reference to the
> callable object. Just I don't like to have to put "identifier"
> everywhere, it would be much better to define handlers in a uniform way
> without having to know what kind of callable you're passing as 
> argument.

Using the function name as the identifier was an experiment which I 
think was a bad idea. I'll roll that code back out.

Before I started using the function name, I used an arbitrary 
identifier which was opaque and made debugging difficult. With the 
addition of the programmer-supplied identifier, debugging can be made 
easier by providing it, and an opaque identifier can be used if none is 


More information about the Twisted-web mailing list