imported method from module evaluates to None in some cases
__peter__ at web.de
Sun Nov 23 12:23:12 CET 2008
Paul McGuire wrote:
> On Nov 23, 4:21 am, Hrvoje Niksic <hnik... at xemacs.org> wrote:
>> I don't know why the interpreter would shut down abruptly, but I
>> suppose you could inspect the traceback to see what exactly caused the
>> exception?- Hide quoted text -
> While you puzzle out the root cause, could something like this help
> alleviate your race condition at interpreter shutdown?
> -- Paul
> def safe_call(fn, alt):
> if fn is not None:
> return fn
> return alt
> def WakeupAlt():
> print "Wakeup has been set to None"
> def Wakeup():
> print "This is your wakeup call..."
> Wakeup = None
> This is your wakeup call...
> Wakeup has been set to None
Hm, what makes you confident that neither WakupAlt() nor safe_call() may be
set to None, too?
More information about the Python-list