Module sets :: Class BaseSet
[show private | hide private]
[frames | no frames]

Type BaseSet

object --+
         |
        BaseSet

Known Subclasses:
Set

Common base class for mutable and immutable sets.
Method Summary
  __init__(self)
This is an abstract class.
  __and__(self, other)
Return the intersection of two sets as a new set.
  __cmp__(self, other)
  __contains__(self, element)
Report whether an element is a member of a set.
  __copy__(self)
Return a shallow copy of a set.
  __deepcopy__(self, memo)
Return a deep copy of a set; used by copy module.
  __eq__(self, other)
  __ge__(self, other)
Report whether this set contains another set.
  __gt__(self, other)
  __iter__(self)
Return an iterator over the elements or a set.
  __le__(self, other)
Report whether another set contains this set.
  __len__(self)
Return the number of elements of a set.
  __lt__(self, other)
  __ne__(self, other)
  __or__(self, other)
Return the union of two sets as a new set.
  __repr__(self)
Return string representation of a set.
  __str__(self)
Return string representation of a set.
  __sub__(self, other)
Return the difference of two sets as a new Set.
  __xor__(self, other)
Return the symmetric difference of two sets as a new set.
  copy(self)
Return a shallow copy of a set.
  difference(self, other)
Return the difference of two sets as a new Set.
  intersection(self, other)
Return the intersection of two sets as a new set.
  issubset(self, other)
Report whether another set contains this set.
  issuperset(self, other)
Report whether this set contains another set.
  symmetric_difference(self, other)
Return the symmetric difference of two sets as a new set.
  union(self, other)
Return the union of two sets as a new set.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
list __slots__ = ['_data']

Method Details

__init__(self)
(Constructor)

This is an abstract class.
Overrides:
__builtin__.object.__init__

__and__(self, other)
(And operator)

Return the intersection of two sets as a new set.

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

__contains__(self, element)
(In operator)

Report whether an element is a member of a set.

(Called in response to the expression `element in self'.)

__copy__(self)

Return a shallow copy of a set.

__deepcopy__(self, memo)

Return a deep copy of a set; used by copy module.

__ge__(self, other)
(Greater-than-or-equals operator)

Report whether this set contains another set.

__iter__(self)

Return an iterator over the elements or a set.

This is the keys iterator for the underlying dict.

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

Report whether another set contains this set.

__len__(self)
(Length operator)

Return the number of elements of a set.

__or__(self, other)
(Or operator)

Return the union of two sets as a new set.

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

__repr__(self)
(Representation operator)

Return string representation of a set.

This looks like 'Set([<list of elements>])'.
Overrides:
__builtin__.object.__repr__

__str__(self)
(Informal representation operator)

Return string representation of a set.

This looks like 'Set([<list of elements>])'.
Overrides:
__builtin__.object.__repr__

__sub__(self, other)
(Subtraction operator)

Return the difference of two sets as a new Set.

(I.e. all elements that are in this set and not in the other.)

__xor__(self, other)

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

(I.e. all elements that are in exactly one of the sets.)

copy(self)

Return a shallow copy of a set.

difference(self, other)

Return the difference of two sets as a new Set.

(I.e. all elements that are in this set and not in the other.)

intersection(self, other)

Return the intersection of two sets as a new set.

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

issubset(self, other)

Report whether another set contains this set.

issuperset(self, other)

Report whether this set contains another set.

symmetric_difference(self, other)

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

(I.e. all elements that are in exactly one of the sets.)

union(self, other)

Return the union of two sets as a new set.

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

Class Variable Details

__slots__

Type:
list
Value:
['_data']                                                              

Generated by Epydoc 2.1 on Fri Jun 24 12:01:19 2005 http://epydoc.sf.net