picop.cymapping#
Mapping protocol helpers.
- picop.cymapping.map_check(o)#
Return True if
oprovides the mapping protocol. :type o:object:param o:- Return type:
- picop.cymapping.map_del(o, key)#
Delete
o[key]viaPyMapping_DelItem.Notes
Returns
0on success; errors raise — do not use the status as a bool.
- picop.cymapping.map_del_cstr(o, key)#
Delete
o[key]viaPyMapping_DelItemString.Notes
keymust bebytes, notstr. Returns0on success; errors raise — do not use the status as a bool. Alias ofmap_del_string.
- picop.cymapping.map_eq(a, b)#
Return True if mappings are equal via identity/size short-circuit + richcompare.
Notes
Prefer
dict_eqwhen both operands are knowndictinstances.
- picop.cymapping.map_getitem_cstr(o, key)#
Return
o[key]viaPyMapping_GetItemString.Notes
keymust bebytes(ASCII/UTF-8), notstr. See Safety. Alias ofmap_getitem_string(prefer*_cstr).
- picop.cymapping.map_has_key(o, key)#
Return True if mapping
ohaskey. :type o:object:param o: :type key:object:param key:- Return type:
- picop.cymapping.map_has_key_cstr(o, key)#
Return True if mapping
ohas C-stringkey.Notes
keymust bebytes(ASCII/UTF-8), notstr. See Safety. Alias ofmap_has_key_string(prefer*_cstr).
- picop.cymapping.map_items(o)#
Return
o.items()viaPyMapping_Items. :type o:object:param o:- Return type:
- picop.cymapping.map_keys(o)#
Return
o.keys()viaPyMapping_Keys. :type o:object:param o:- Return type:
- picop.cymapping.map_len(o)#
- picop.cymapping.map_setitem_cstr(o, key, v)#
Set
o[key] = vviaPyMapping_SetItemString.Notes
keymust bebytes, notstr. Returns0on success; errors raise — do not use the status as a bool. Alias ofmap_setitem_string.