]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
At 2.2, the Py<type>_Check() family of API functions (macros) changed
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Fri, 26 Dec 2003 00:07:51 +0000 (00:07 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Fri, 26 Dec 2003 00:07:51 +0000 (00:07 +0000)
semantics to include subtypes.  Most concrete object APIs then had
a Py<type>_CheckExact() macro added to test for an object's type
not including subtypes.

The PyDict_CheckExact() macro wasn't created at that time, so I've added
it for API completeness/symmetry - even though nobody has complained
about its absence in the time since 2.2 was released.

Not a backport candidate.

Doc/api/concrete.tex

index 143c98814b8d4ecd714af84c062f21d52cfb697a..99bb0df9d04233913c02b4b2e7c8b04524a0e69f 100644 (file)
@@ -1803,6 +1803,12 @@ format.
   \versionchanged[Allowed subtypes to be accepted]{2.2}
 \end{cfuncdesc}
 
+\begin{cfuncdesc}{int}{PyDict_CheckExact}{PyObject *p}
+  Return true if \var{p} is a dict object, but not an instance of a
+  subtype of the dict type.
+  \versionadded{2.4}
+\end{cfuncdesc}
+
 \begin{cfuncdesc}{PyObject*}{PyDict_New}{}
   Returns a new empty dictionary, or \NULL{} on failure.
 \end{cfuncdesc}