Package horizons :: Package ext :: Module typing :: Class Iterable
[hide private]
[frames] | no frames]

Class Iterable

object --+        
         |        
   Generic --+    
             |    
    object --+    
             |    
  ??.Generic-1 --+
                 |
                Iterable
Known Subclasses:

Abstract base class for generic types.

A generic type is typically declared by inheriting from an instantiation of this class with one or more type variables. For example, a generic mapping type might be defined as:

 class Mapping(Generic[KT, VT]):
     def __getitem__(self, key: KT) -> VT:
         ...
     # Etc.

This class can then be used as follows:

 def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
     try:
         return mapping[key]
     except KeyError:
         return default
Nested Classes [hide private]
  __extra__
hash(x)
    Inherited from Generic
  __metaclass__
Metaclass for generic types.
  __next_in_mro__
The most base type
Instance Methods [hide private]
    Inherited from object
 
__delattr__(...)
x.__delattr__('name') <==> del x.name
 
__format__(...)
default object formatter
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
__hash__(x)
hash(x)
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__reduce__(...)
helper for pickle
 
__reduce_ex__(...)
helper for pickle
 
__repr__(x)
repr(x)
 
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
int
__sizeof__()
size of object in memory, in bytes
 
__str__(x)
str(x)
 
__subclasshook__(...)
Abstract classes can override this to customize issubclass().
Static Methods [hide private]
    Inherited from Generic
a new object with type S, a subtype of T
__new__(cls, *args, **kwds)
Class Variables [hide private]
  __origin__ = None
hash(x)

Inherited from unreachable.Generic: __parameters__

    Inherited from Generic
  __abstractmethods__ = frozenset([])
  __args__ = None
hash(x)
  _abc_cache = <_weakrefset.WeakSet object at 0x7f2058847ad0>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x7f20588...
  _abc_negative_cache_version = 20
  _abc_registry = <_weakrefset.WeakSet object at 0x7f2058847a90>
Properties [hide private]
    Inherited from object
  __class__
the object's class