-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
gh-141510: Update PyDict C API doc for frozendict #145533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
847567f
0119335
9a4a6d9
48d3591
60b622f
31a4385
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -42,6 +42,9 @@ Dictionary objects | |||||
| enforces read-only behavior. This is normally used to create a view to | ||||||
| prevent modification of the dictionary for non-dynamic class types. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
ZeroIntensity marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
|
Comment on lines
+48
to
+50
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now, do we need
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's nice to have an explicit historical record.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to be explicit about the change. |
||||||
|
|
||||||
| .. c:var:: PyTypeObject PyDictProxy_Type | ||||||
|
|
||||||
|
|
@@ -77,6 +80,9 @@ Dictionary objects | |||||
|
|
||||||
| .. versionadded:: 3.13 | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: PyObject* PyDict_Copy(PyObject *p) | ||||||
|
|
||||||
|
|
@@ -128,6 +134,9 @@ Dictionary objects | |||||
|
|
||||||
| .. versionadded:: 3.13 | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
| See also the :c:func:`PyObject_GetItem` function. | ||||||
|
|
||||||
|
|
||||||
|
|
@@ -147,6 +156,9 @@ Dictionary objects | |||||
| Calling this API without an :term:`attached thread state` had been allowed for historical | ||||||
| reason. It is no longer allowed. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: PyObject* PyDict_GetItemWithError(PyObject *p, PyObject *key) | ||||||
|
|
||||||
|
|
@@ -155,6 +167,9 @@ Dictionary objects | |||||
| occurred. Return ``NULL`` **without** an exception set if the key | ||||||
| wasn't present. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: PyObject* PyDict_GetItemString(PyObject *p, const char *key) | ||||||
|
|
||||||
|
|
@@ -170,6 +185,9 @@ Dictionary objects | |||||
| Prefer using the :c:func:`PyDict_GetItemWithError` function with your own | ||||||
| :c:func:`PyUnicode_FromString` *key* instead. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: int PyDict_GetItemStringRef(PyObject *p, const char *key, PyObject **result) | ||||||
|
|
||||||
|
|
@@ -179,6 +197,9 @@ Dictionary objects | |||||
|
|
||||||
| .. versionadded:: 3.13 | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: PyObject* PyDict_SetDefault(PyObject *p, PyObject *key, PyObject *defaultobj) | ||||||
|
|
||||||
|
|
@@ -242,17 +263,26 @@ Dictionary objects | |||||
|
|
||||||
| Return a :c:type:`PyListObject` containing all the items from the dictionary. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: PyObject* PyDict_Keys(PyObject *p) | ||||||
|
|
||||||
| Return a :c:type:`PyListObject` containing all the keys from the dictionary. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: PyObject* PyDict_Values(PyObject *p) | ||||||
|
|
||||||
| Return a :c:type:`PyListObject` containing all the values from the dictionary | ||||||
| *p*. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: Py_ssize_t PyDict_Size(PyObject *p) | ||||||
|
|
||||||
|
|
@@ -261,11 +291,17 @@ Dictionary objects | |||||
| Return the number of items in the dictionary. This is equivalent to | ||||||
| ``len(p)`` on a dictionary. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: Py_ssize_t PyDict_GET_SIZE(PyObject *p) | ||||||
|
|
||||||
| Similar to :c:func:`PyDict_Size`, but without error checking. | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
|
|
||||||
| .. c:function:: int PyDict_Next(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) | ||||||
|
|
||||||
|
|
@@ -333,6 +369,9 @@ Dictionary objects | |||||
| :term:`strong reference <strong reference>` (for example, using | ||||||
| :c:func:`Py_NewRef`). | ||||||
|
|
||||||
| .. versionchanged:: next | ||||||
| Accept also :class:`frozendict`. | ||||||
|
|
||||||
| .. c:function:: int PyDict_Merge(PyObject *a, PyObject *b, int override) | ||||||
|
|
||||||
| Iterate over mapping object *b* adding key-value pairs to dictionary *a*. | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.