[Python-bugs-list] [ python-Bugs-567607 ] whatsnew explains noargs incorrectly

noreply@sourceforge.net noreply@sourceforge.net
Thu, 05 Sep 2002 06:46:29 -0700


Bugs item #567607, was opened at 2002-06-11 16:26
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=567607&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: A.M. Kuchling (akuchling)
Summary: whatsnew explains noargs incorrectly

Initial Comment:
http://www.python.org/dev/doc/devel/whatsnew/node8.html

says that PyArg_NoArgs is deprectated and that
ParseTuple should be used instead. I believe that the
recommendations should be to use METH_NOARGS instead.

----------------------------------------------------------------------

Comment By: A.M. Kuchling (akuchling)
Date: 2002-07-11 15:25

Message:
Logged In: YES 
user_id=11375

I've revised the text, which still mentions
ParseTuple, for pre-2.2 compatibility.  New text follows.  
Thanks for pointing this out!

\item The \cfunction{PyArg_NoArgs()} macro is now 
deprecated.  Code
that uses it should be changed.  For Python 2.2 and later, 
the method
definition table can specify the
\constant{METH_NOARGS} flag, signalling that there are 
no arguments, and 
the argument checking can then be removed.  If 
compatibility with
pre-2.2 versions of Python is important, the code could use
\code{PyArg_ParseTuple(args, "")} instead, but this will be 
slower 
than using \constant{METH_NOARGS}.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=567607&group_id=5470