ValueSet¶
- class dsviper.ValueSet¶
Bases:
objectA class used to represent a value of type set<element_type>. Seamless with a Python seq[object].
Or use Value.create(type_set [, initial_value]).
- add(value: _InputValues) None¶
Add an element to a set. This has no effect if the element is already present.
- at(index: int, *, encoded: bool = True) _OutputValues¶
Return the element at index.
- clear() None¶
Remove all elements from this set.
- difference(value: Sequence | ValueSet) ValueSet¶
Return the difference of two or more sets as a new set. (i.e., all elements that are in this set but not the others.)
- difference_update(value: Sequence | ValueSet) None¶
Remove all elements of another set from this set.
- discard(value: _InputValues) None¶
Remove an element from a set; it must be a member. If the element is not a member, do nothing.
- empty() bool¶
Remove True if the container is empty.
- hash() int¶
Return the hash value.
- index(value: _InputValues) int | None¶
Return the index or None.
- intersection(value: Sequence | ValueSet) ValueSet¶
Return the intersection of two sets as a new set. (i.e., all elements that are in both sets.)
- intersection_update(value: Sequence | ValueSet) None¶
Update a set with the intersection of itself and another.
- max(*, encoded: bool = True) _OutputValues¶
Return the maximum element or raise.
- min(*, encoded: bool = True) _OutputValues¶
Return the minimum element or raise.
- pop(*, encoded: bool = True) _OutputValues¶
Remove and return the min element. Raises error if the set is empty.
- pop_max(*, encoded: bool = True) _OutputValues¶
Remove and return the max element. Raises error if the set is empty.
- remove(value: _InputValues) None¶
Remove an element from a set; it must be a member. If the element is not a member, raise a KeyError.
- representation() str¶
Return the representation.
- size() int¶
Return the number of elements.
- symmetric_difference(value: Sequence | ValueSet) ValueSet¶
Return the symmetric difference of two sets as a new set. (i.e., all elements that are in exactly one of the sets.)
- symmetric_difference_update(value: Sequence | ValueSet) None¶
Update a set with the symmetric difference of itself and another.
- type_code() str¶
Return the type code.