Availability: >= 2.7
Availability: >= 2.7
Availability: >= 2.7
Availability: >= 2.7
_
_
_
_
_
_
_
_
_
Availability: 3.*
_
_
PyDict_Merge updates/merges from a mapping object (an object that supports PyMapping_Keys() and PyObject_GetItem()). If override is true, the last occurrence of a key wins, else the first. The Python dict.update(other) is equivalent to PyDict_Merge(dict, other, 1).
PyDict_MergeFromSeq2 updates/merges from an iterable object producing iterable objects of length 2. If override is true, the last occurrence of a key wins, else the first. The Python dict constructor dict(seq2) is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1).
_
_
_
_
_
PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1).
_
Availability: >= 2.5
Availability: >= 2.7
Availability: 3.*
Availability: >= 2.7
Availability: >= 2.6
Availability: >= 2.5
_
To ensure the lookup algorithm terminates, there must be at least one Unused slot (NULL key) in the table. The value ma_fill is the number of non-NULL keys (sum of Active and Dummy); ma_used is the number of non-NULL, non-dummy keys (== the number of non-NULL values == the number of Active items). To avoid slowing down lookups on a near-full table, we resize the table when it's two-thirds full.
To ensure the lookup algorithm terminates, there must be at least one Unused slot (NULL key) in the table. The value ma_fill is the number of non-NULL keys (sum of Active and Dummy); ma_used is the number of non-NULL, non-dummy keys (== the number of non-NULL values == the number of Active items). To avoid slowing down lookups on a near-full table, we resize the table when it's two-thirds full.
PyDict_MINSIZE is the minimum size of a dictionary. This many slots are allocated directly in the dict object (in the ma_smalltable member). It must be a power of 2, and at least 4. 8 allows dicts with no more than 5 active entries to live in ma_smalltable (and so avoid an additional malloc); instrumentation suggested this suffices for the majority of dicts (consisting mostly of usually-small instance dicts and usually-small dicts created to pass keyword arguments).
Mirror dictobject.h