[Python-Dev] Use of PyArg_NoArgs()

Fred L. Drake, Jr. fdrake@acm.org
2002年3月25日 11:07:34 -0500


Neal Norwitz writes:
 > Should the use of PyArg_NoArgs() be deprecated?
Probably. Even if used with METH_OLDARSG, it doesn't produce as nice
an error message because it doesn't know the name of the function it
is being called for. There should be strong encouragement to shift to
using METH_NOARGS in code that doesn't need to be compatible with
older versions of Python. (And the code distributed with Python
certainly seems to fall into that category!)
 > There are many uses (53) throughout Modules/*.c. It seems that this
 > check is not useful anymore if the MethodDef is set to METH_NOARGS.
 > Is this correct? If so, I can make a patch.
Please do. Thanks!
 -Fred
-- 
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation

AltStyle によって変換されたページ (->オリジナル) /