Orbits
1
|
Public Member Functions | |
def | __le__ |
def | __lt__ |
def | __gt__ |
def | __ge__ |
def | __eq__ |
def | __ne__ |
def | __and__ |
def | isdisjoint |
def | __or__ |
def | __sub__ |
def | __xor__ |
Public Member Functions inherited from _abcoll.Sized | |
def | __len__ |
def | __subclasshook__ |
Public Member Functions inherited from _abcoll.Iterable | |
def | __iter__ |
def | __subclasshook__ |
Public Member Functions inherited from _abcoll.Container | |
def | __contains__ |
def | __subclasshook__ |
Private Member Functions | |
def | _from_iterable |
def | _hash |
Static Private Attributes | |
__hash__ = None | |
A set is a finite, iterable container. This class provides concrete generic implementations of all methods except for __contains__, __iter__ and __len__. To override the comparisons (presumably for speed, as the semantics are fixed), all you have to do is redefine __le__ and then the other operations will automatically follow suit.
def _abcoll.Set.__and__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__eq__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__ge__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__gt__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__le__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__lt__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__ne__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__or__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__sub__ | ( | self, | |
other | |||
) |
def _abcoll.Set.__xor__ | ( | self, | |
other | |||
) |
|
private |
Construct an instance of the class from any iterable input. Must override this method if the class constructor signature does not accept an iterable for an input.
|
private |
Compute the hash value of a set. Note that we don't define __hash__: not all sets are hashable. But if you define a hashable set type, its __hash__ should call this function. This must be compatible __eq__. All sets ought to compare equal if they contain the same elements, regardless of how they are implemented, and regardless of the order of the elements; so there's not much freedom for __eq__ or __hash__. We match the algorithm used by the built-in frozenset type.
def _abcoll.Set.isdisjoint | ( | self, | |
other | |||
) |
|
staticprivate |
Copyright 2014 Google Inc. All rights reserved.