_abcoll :: KeysView :: Class KeysView
[hide private]
[frames] | no frames]

Class KeysView

object --+        
         |        
     Sized --+    
             |    
   MappingView --+
                 |
object --+       |
         |       |
     Sized --+   |
             |   |
object --+   |   |
         |   |   |
  Iterable --+   |
             |   |
object --+   |   |
         |   |   |
 Container --+   |
             |   |
           Set --+
                 |
                KeysView

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), redefine __le__ and __ge__, then the other operations will automatically follow suit.

Nested Classes [hide private]
    Inherited from Sized
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
__contains__(self, key)
 
__iter__(self)
    Inherited from MappingView
 
__init__(self, mapping)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__len__(self)
 
__repr__(self)
repr(x)
    Inherited from Set
 
__and__(self, other)
 
__eq__(self, other)
 
__ge__(self, other)
 
__gt__(self, other)
 
__le__(self, other)
 
__lt__(self, other)
 
__ne__(self, other)
 
__or__(self, other)
 
__rand__(self, other)
 
__ror__(self, other)
 
__rsub__(self, other)
 
__rxor__(self, other)
 
__sub__(self, other)
 
__xor__(self, other)
 
_hash(self)
Compute the hash value of a set.
 
isdisjoint(self, other)
Return True if two sets have a null intersection.
    Inherited from object
 
__delattr__(...)
x.__delattr__('name') <==> del x.name
 
__format__(...)
default object formatter
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__reduce__(...)
helper for pickle
 
__reduce_ex__(...)
helper for pickle
 
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
int
__sizeof__()
size of object in memory, in bytes
 
__str__(x)
str(x)
Class Methods [hide private]
 
_from_iterable(self, it)
Construct an instance of the class from any iterable input.
    Inherited from Sized
 
__subclasshook__(cls, C)
Abstract classes can override this to customize issubclass().
Class Variables [hide private]
    Inherited from MappingView
  __abstractmethods__ = frozenset([])
  _abc_negative_cache_version = 3
    Inherited from Set
  __hash__ = None
hash(x)
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x7fe36ff...
  _abc_registry = <_weakrefset.WeakSet object at 0x7fe36fff9450>
    Inherited from Sized
  _abc_cache = <_weakrefset.WeakSet object at 0x7fe36ffeef90>
Properties [hide private]
    Inherited from object
  __class__
the object's class
Method Details [hide private]

__contains__(self, key)
(In operator)

 
Overrides: Container.__contains__

__iter__(self)

 
Overrides: Iterable.__iter__

_from_iterable(self, it)
Class Method

 

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.

Overrides: Set._from_iterable
(inherited documentation)