[Python-Dev] Deprecating C APIs (Use of PyArg_NoArgs()) (original) (raw)

Guido van Rossum guido@python.org
Wed, 03 Apr 2002 12:51:52 -0500


If that's possible, I'm +1 on generating a warning for the first usage of PyArgNoArgs(). Would be nice to have the warning include the calling module name -- don't know whether that's possible, though (I have next to no experience with the warning framework).

It peeks in the current globals for name. The current globals are those of the most recent Python module on the stack. Since it also gives a line number, you might be able to track down which call it's referring to. But it might be somewhat surprising.

--Guido van Rossum (home page: http://www.python.org/~guido/)