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

Class Set


The set class. It can contain mutable objects.


Method Summary
  __init__(self, seq)
The constructor.
  __add__(self, other)
Symmetric difference of two sets.
  __and__(self, other)
Intersection of two sets.
  __contains__(self, elem)
  __eq__(self, other)
Returns 1 if the sets are equal.
  __getitem__(self, index)
  __iter__(self)
  __le__(self, other)
Returns 1 if the lhs set is contained in the rhs set.
  __len__(self)
  __lt__(self, other)
Returns 1 if the lhs set is contained but not equal to the rhs set.
  __mul__(self, other)
Cartesian product of two sets.
  __or__(self, other)
Union of two sets.
  __str__(self)
  __sub__(self, other)
Difference of two sets.
  add(self, elem)
Add one element to the set.
  copy(self)
Shallow copy of a set object.
  discard(self, elem)
Remove an element from the set.
  items(self)
Returns a list of the elements in the set.
  remove(self, elem)
Remove an element from the set.
  sort(self, func)

Method Details

__init__(self, seq=None)
(Constructor)

The constructor. It can take any object giving an iterator as an optional argument to populate the new set.

__add__(self, other)
(Addition operator)

Symmetric difference of two sets.

__and__(self, other)
(And operator)

Intersection of two sets.

__eq__(self, other)
(Equality operator)

Returns 1 if the sets are equal.

__le__(self, other)
(Less-than-or-equals operator)

Returns 1 if the lhs set is contained in the rhs set.

__lt__(self, other)
(Less-than operator)

Returns 1 if the lhs set is contained but not equal to the rhs set.

__mul__(self, other)

Cartesian product of two sets.

__or__(self, other)
(Or operator)

Union of two sets.

__sub__(self, other)
(Subtraction operator)

Difference of two sets.

add(self, elem)

Add one element to the set.

copy(self)

Shallow copy of a set object.

discard(self, elem)

Remove an element from the set. Do nothing if elem is not in the set.

items(self)

Returns a list of the elements in the set.

remove(self, elem)

Remove an element from the set. Return an error if elem is not in the set.


Generated by Epydoc 2.1 on Wed Dec 12 09:39:31 2007 http://epydoc.sf.net