]> granicus.if.org Git - python/commitdiff
The semantics of PyList_Check() and PyDict_Check() changed at 2.2, along
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Thu, 25 Dec 2003 23:57:52 +0000 (23:57 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Thu, 25 Dec 2003 23:57:52 +0000 (23:57 +0000)
with most other concrete object checks, but the docs weren't brought into
line.

PyList_CheckExact() was added at 2.2 but never documented.

backport candidate.

Doc/api/concrete.tex

index c233ed4ed6d0361f7ab219cc6b116d39a52c9ee2..143c98814b8d4ecd714af84c062f21d52cfb697a 100644 (file)
@@ -1670,7 +1670,15 @@ format.
 \end{cvardesc}
 
 \begin{cfuncdesc}{int}{PyList_Check}{PyObject *p}
-  Returns true if its argument is a \ctype{PyListObject}.
+  Returns true if \var{p} is a list object or an instance of a
+  subtype of the list type.
+  \versionchanged[Allowed subtypes to be accepted]{2.2}
+\end{cfuncdesc}
+
+\begin{cfuncdesc}{int}{PyList_CheckExact}{PyObject *p}
+  Return true if \var{p} is a list object, but not an instance of a
+  subtype of the list type.
+  \versionadded{2.2}
 \end{cfuncdesc}
 
 \begin{cfuncdesc}{PyObject*}{PyList_New}{int len}
@@ -1790,7 +1798,9 @@ format.
 \end{cvardesc}
 
 \begin{cfuncdesc}{int}{PyDict_Check}{PyObject *p}
-  Returns true if its argument is a \ctype{PyDictObject}.
+  Returns true if \var{p} is a dict object or an instance of a
+  subtype of the dict type.
+  \versionchanged[Allowed subtypes to be accepted]{2.2}
 \end{cfuncdesc}
 
 \begin{cfuncdesc}{PyObject*}{PyDict_New}{}