Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f72af65

Browse files
author
Andrew MacIntyre
committed
At 2.2, the Py<type>_Check() family of API functions (macros) changed
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.
1 parent 43e5711 commit f72af65

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/api/concrete.tex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,12 @@ \subsection{Dictionary Objects \label{dictObjects}}
18031803
\versionchanged[Allowed subtypes to be accepted]{2.2}
18041804
\end{cfuncdesc}
18051805

1806+
\begin{cfuncdesc}{int}{PyDict_CheckExact}{PyObject *p}
1807+
Return true if \var{p} is a dict object, but not an instance of a
1808+
subtype of the dict type.
1809+
\versionadded{2.4}
1810+
\end{cfuncdesc}
1811+
18061812
\begin{cfuncdesc}{PyObject*}{PyDict_New}{}
18071813
Returns a new empty dictionary, or \NULL{} on failure.
18081814
\end{cfuncdesc}

0 commit comments

Comments
 (0)