Package SCons :: Package compat :: Module _scons_sets :: Class Set
[hide private]
[frames] | no frames]

Class Set

source code

object --+    
         |    
   BaseSet --+
             |
            Set

Mutable set class.



Instance Methods [hide private]
 
__init__(self, iterable=False)
Construct a set from an optional iterable.
source code
 
__getstate__(self) source code
 
__setstate__(self, data) source code
 
__hash__(self)
A Set cannot be hashed.
source code
 
__ior__(self, other)
Update a set with the union of itself and another.
source code
 
union_update(self, other)
Update a set with the union of itself and another.
source code
 
__iand__(self, other)
Update a set with the intersection of itself and another.
source code
 
intersection_update(self, other)
Update a set with the intersection of itself and another.
source code
 
__ixor__(self, other)
Update a set with the symmetric difference of itself and another.
source code
 
symmetric_difference_update(self, other)
Update a set with the symmetric difference of itself and another.
source code
 
__isub__(self, other)
Remove all elements of another set from this set.
source code
 
difference_update(self, other)
Remove all elements of another set from this set.
source code
 
update(self, iterable)
Add all values from an iterable (such as a list or file).
source code
 
clear(self)
Remove all elements from this set.
source code
 
add(self, element)
Add an element to a set.
source code
 
remove(self, element)
Remove an element from a set; it must be a member.
source code
 
discard(self, element)
Remove an element from a set if it is a member.
source code
 
pop(self)
Remove and return an arbitrary set element.
source code
 
__as_immutable__(self) source code
 
__as_temporarily_immutable__(self) source code

Inherited from BaseSet: __and__, __cmp__, __contains__, __copy__, __deepcopy__, __eq__, __ge__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __or__, __repr__, __str__, __sub__, __xor__, copy, difference, intersection, issubset, issuperset, symmetric_difference, union

Inherited from BaseSet (private): _binary_sanity_check, _compute_hash, _repr, _update

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from BaseSet (private): _data

Inherited from object: __class__

Method Details [hide private]

__init__(self, iterable=False)
(Constructor)

source code 
Construct a set from an optional iterable.

Overrides: BaseSet.__init__

__hash__(self)
(Hashing function)

source code 
A Set cannot be hashed.

Overrides: object.__hash__

add(self, element)

source code 
Add an element to a set.

This has no effect if the element is already present.

remove(self, element)

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

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

discard(self, element)

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

If the element is not a member, do nothing.