picop.cyset#
Fast set accessors.
- picop.cyset.frozenset_check(p)#
Return True if
pis afrozensetor subtype. :type p:object:param p:
- picop.cyset.frozenset_check_exact(p)#
Return True if
type(p) is frozenset. :type p:object:param p:
- picop.cyset.frozenset_empty()#
Return a new empty frozenset via
PyFrozenSet_New(NULL).- Return type:
- picop.cyset.frozenset_eq(a, b)#
Return True if typed frozensets are equal (identity/size short-circuit + richcompare). :type a:
frozenset:param a: :type b:frozenset:param b:
- picop.cyset.frozenset_new(iterable)#
Return a new frozenset from
iterableviaPyFrozenSet_New. :type iterable:object:param iterable:- Return type:
- picop.cyset.set_add(s, value)#
Add
valueviaPySet_Add.Notes
Returns
0on success; errors raise. Do not use the status int as a bool.
- picop.cyset.set_any_check(p)#
Return True if
pis a set or frozenset (or subtype). :type p:object:param p:- Return type:
- picop.cyset.set_any_check_exact(p)#
Return True if
type(p) is setorfrozenset(no subtype). :type p:object:param p:- Return type:
- picop.cyset.set_check(p)#
Return True if
pis asetor subtype (PySet_Check). :type p:object:param p:
- picop.cyset.set_check_exact(p)#
Return True if
type(p) is set(PySet_CheckExact). :type p:object:param p:
- picop.cyset.set_clear(s)#
Clear
sviaPySet_Clear.Notes
Returns
0on success; errors raise. Do not use the status int as a bool.
- picop.cyset.set_contains(anyset, value)#
Return whether
valueis inanysetviaPySet_Contains. :type anyset:object:param anyset: :type value:object:param value:
- picop.cyset.set_discard(s, value)#
Discard
valueviaPySet_Discard.Notes
Returns
1if removed,0if absent (noKeyError). Errors raise. Do not treat the status int as a plain bool for success/failure.
- picop.cyset.set_eq(a, b)#
Return True if typed sets are equal (identity/size short-circuit + richcompare). :type a:
set:param a: :type b:set:param b:
- picop.cyset.set_new(iterable)#
Return a new set from
iterableviaPySet_New. :type iterable:object:param iterable:- Return type:
- picop.cyset.set_pop(s)#
- picop.cyset.set_size(anyset)#
Return
len(anyset)via checkedPySet_Size.Notes
Accepts set/frozenset/subtypes. Prefer
set_lenon a typed exactsethot path.