[Pyrex] NoneType object is not callable in dealloc

AKX theakx at gmail.com
Sun Oct 2 13:38:22 CEST 2005


> > Is there a way to make an object (debug) persistent so I would have to
> > clean it myself, or should I maybe just clean up any debug() calls
> > from destructors since they may cause unstable behavior and I don't
> > want to have to have debug as a property of each object?
> >
> I do not know how to control when a global variable is deleted at program
> termination. As for self.debug Pyrex takes care of deleting it for you in the
> destructor. But debug will remain alive if not every instance of AlFont is deleted.
>

Actually the "debug" symbol is not kept alive, "self.debug" is.

>>> print self.debug,debug
<method blabla>, None

Anyways, I solved it by removing debugs from AlFont.

AKX



More information about the Pyrex mailing list