Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ef2578 commit fc05e5eCopy full SHA for fc05e5e
1 file changed
Objects/dictobject.c
@@ -3482,6 +3482,12 @@ dict_length(PyObject *self)
3482
return GET_USED(_PyAnyDict_CAST(self));
3483
}
3484
3485
+static Py_ssize_t
3486
+frozendict_length(PyObject *self)
3487
+{
3488
+ return _PyAnyDict_CAST(self)->ma_used;
3489
+}
3490
+
3491
static PyObject *
3492
dict_subscript(PyObject *self, PyObject *key)
3493
{
@@ -7833,7 +7839,7 @@ static PyNumberMethods frozendict_as_number = {
7833
7839
};
7834
7840
7835
7841
static PyMappingMethods frozendict_as_mapping = {
7836
- .mp_length = dict_length,
7842
+ .mp_length = frozendict_length,
7837
7843
.mp_subscript = dict_subscript,
7838
7844
7845
0 commit comments