Mark Hammond mhammond at
Thu Mar 20 06:33:30 CET 2003

Jane Austine wrote:

> It seems like "func == NULL" is true and the message is thrown to the
> stderr at the time.

You should confirm this.  There is a chance that the function is not 
NULL, and the warnings.warn() function is dumping it to stdout.

> Now the question:
> Why is the func(warnings.warn) NULL in this case? 

It doesn't sound like we are sure about that.

> What does that mean?
> When is it supposed to be NULL?

It should never be NULL.  Python's startup (see pythonrun.c) sets this 
value.  Thus is should only be NULL is "import warnings" failed during 


More information about the Python-list mailing list