PyErr_Warn
Mark Hammond
mhammond at skippinet.com.au
Thu Mar 20 00:33:30 EST 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
startup.
Mark.
More information about the Python-list
mailing list