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 cleanup “function-type-argument-type-semantics”. 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: The Values Declaration, Previous: The Empty Type, Up: More About Types in Python   [Contents][Index]