Next: , Previous: , Up: More About Types in Python   [Contents][Index]


5.2.6 Function Types

function types are understood in the restrictive sense, specifying:

This is consistent with the new interpretation of function types and the ftype declaration in the proposed X3J13 “function-type-argument-type-semantics” cleanup. Note also, that if you don’t explicitly declare the type of a function using a global ftype declaration, then Python will compute a function type from the definition, providing a degree of inter-routine type inference, see function-type-inference.


Next: , Previous: , Up: More About Types in Python   [Contents][Index]