dicfg.configs.configset.ConfigSet#

class ConfigSet(data, updater=None, validator=None)[source]#

Bases: ConfigValue, set

__init__(data: Any, updater: tuple[UpdaterAddon] | None = None, validator: tuple[ValidatorAddon] | None = None)#

Methods

__init__(data[, updater, validator])

add

Add an element to a set.

cast()

Cast wrapped value to builtin python value

clear

Remove all elements from this set.

copy

Return a shallow copy of a set.

difference

Return the difference of two or more sets as a new set.

difference_update

Remove all elements of another set from this set.

discard

Remove an element from a set if it is a member.

factory(data[, updater, validator, modifier])

intersection

Return the intersection of two sets as a new set.

intersection_update

Update a set with the intersection of itself and another.

isdisjoint

Return True if two sets have a null intersection.

issubset

Report whether another set contains this set.

issuperset

Report whether this set contains another set.

modify(b)

Merges config b with it self

pop

Remove and return an arbitrary set element.

remove

Remove an element from a set; it must be a member.

symmetric_difference

Return the symmetric difference of two sets as a new set.

symmetric_difference_update

Update a set with the symmetric difference of itself and another.

union

Return the union of sets as a new set.

update

Update a set with the union of itself and others.

validate()

Validate the config

add()#

Add an element to a set.

This has no effect if the element is already present.

cast()[source]#

Cast wrapped value to builtin python value

clear()#

Remove all elements from this set.

copy()#

Return a shallow copy of a set.

difference()#

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()#

Remove all elements of another set from this set.

discard()#

Remove an element from a set if it is a member.

If the element is not a member, do nothing.

intersection()#

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

intersection_update()#

Update a set with the intersection of itself and another.

isdisjoint()#

Return True if two sets have a null intersection.

issubset()#

Report whether another set contains this set.

issuperset()#

Report whether this set contains another set.

modify(b: ConfigValue) ConfigValue#

Merges config b with it self

Parameters:

b (ConfigValue) – another config

Returns:

self

Return type:

ConfigValue

pop()#

Remove and return an arbitrary set element. Raises KeyError if the set is empty.

remove()#

Remove an element from a set; it must be a member.

If the element is not a member, raise a KeyError.

symmetric_difference()#

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()#

Update a set with the symmetric difference of itself and another.

union()#

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

update()#

Update a set with the union of itself and others.

validate()[source]#

Validate the config