summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2002-07-11 19:27:46 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2002-07-11 19:27:46 (GMT)
commit7845e7c7266f246a8ff35cd5a433ecb1cb81064f (patch)
treeef5a451b85439ff77db5d03e6b9d59c8f9ff6e6a
parentc62b95e550a521760e9b9495bbd4f31ac4a15eb0 (diff)
downloadcpython-7845e7c7266f246a8ff35cd5a433ecb1cb81064f.zip
cpython-7845e7c7266f246a8ff35cd5a433ecb1cb81064f.tar.gz
cpython-7845e7c7266f246a8ff35cd5a433ecb1cb81064f.tar.bz2
[Bug #567607] Suggest METH_NOARGS to replace PyArg_NoArgs
-rw-r--r--Doc/whatsnew/whatsnew23.tex14
1 files changed, 9 insertions, 5 deletions
diff --git a/Doc/whatsnew/whatsnew23.tex b/Doc/whatsnew/whatsnew23.tex
index 87f5290..9a147f1 100644
--- a/Doc/whatsnew/whatsnew23.tex
+++ b/Doc/whatsnew/whatsnew23.tex
@@ -653,9 +653,13 @@ when running Python's \file{configure} script. (Contributed by Ondrej
Palkovsky.)
\item The \cfunction{PyArg_NoArgs()} macro is now deprecated, and code
-that
-uses it should be changed to use \code{PyArg_ParseTuple(args, "")}
-instead.
+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}.
\item A new function, \cfunction{PyObject_DelItemString(\var{mapping},
char *\var{key})} was added
@@ -721,7 +725,7 @@ as well as \UNIX.
The author would like to thank the following people for offering
suggestions, corrections and assistance with various drafts of this
article: Michael Chermside, Scott David Daniels, Fred~L. Drake, Jr.,
-Michael Hudson, Detlef Lannert, Andrew MacIntyre, Gustavo Niemeyer,
-Neal Norwitz.
+Michael Hudson, Detlef Lannert, Martin von L\"owis, Andrew MacIntyre,
+Gustavo Niemeyer, Neal Norwitz.
\end{document}