picop.cyfrozendict#
Fast frozendict helpers (CPython 3.15+).
- picop.cyfrozendict.anydict_check(obj)#
Return True if
objis a dict or a frozendict (subtypes included).Notes
mirrors
PyAnyDict_Check; on 3.14 this isdict_check.
- picop.cyfrozendict.anydict_check_exact(obj)#
Return True if
objis exactly a dict or exactly a frozendict.Notes
dictsubclasses such asdefaultdictare False.
- picop.cyfrozendict.anydict_len(obj)#
Return the entry count of a dict or frozendict.
Notes
raises
TypeErrorfor anything else; the read uses thePyDict_GET_SIZElayout shared by dict and frozendict.
- picop.cyfrozendict.frozendict_check(obj)#
Return True if
objis a frozendict or a frozendict subtype.
- picop.cyfrozendict.frozendict_check_exact(obj)#
Return True if
objis exactly a frozendict (subtypes excluded).
- picop.cyfrozendict.frozendict_empty()#
Return an empty frozendict without building an iterable.
Notes
raises
NotImplementedErroron 3.14.- Return type:
- picop.cyfrozendict.frozendict_new(iterable)#
Return a new frozendict built from an iterable.
Notes
Noneis not iterable — usefrozendict_empty()for the no-iterable path. Passing an existing frozendict returns the same object with an incremented reference, not a copy. RaisesNotImplementedErroron 3.14.