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

Class Callable

object --+    
         |    
     Final --+
             |
            Callable

Callable type; Callable[[int], str] is a function of (int) -> str.

The subscription syntax must always be used with exactly two values: the argument list and the return type. The argument list must be a list of types; the return type must be a single type.

There is no syntax to indicate optional or keyword arguments, such function types are rarely used as callback types.

Nested Classes [hide private]
  __metaclass__
Metaclass for Callable.
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 Final
a new object with type S, a subtype of T
__new__(self, *args, **kwds)
Class Variables [hide private]
  __args__ = None
hash(x)
  __result__ = None
hash(x)
Properties [hide private]
    Inherited from object
  __class__
the object's class