[Python-3000] callable()
Collin Winter
collinw at gmail.com
Mon Jul 17 19:45:37 CEST 2006
On 7/17/06, Alex Martelli <aleaxit at gmail.com> wrote:
> [proposal for a type annotations-based version of callable()]
To weigh in from the function/type annotations side of things, the
consensus has been that Python 3000's function annotations are only a
way to map parameter names to some arbitrary expression, i.e., they
have no semantic value of their own. If I write 'def foo(a: int)',
associating the int type with the 'a' parameter, core Python won't
actually check that values provided for 'a' are in fact integers.
Interpreting these annotations, giving them meaning, will be left
completely up to third-party libraries.
This reliance on third-party libraries, then, means that any
annotations-based version of callable() would also have to be provided
by these same third-party libraries. Put simply, the proposed
implementation of callable() wouldn't be able to ship in __builtin__.
Collin Winter
More information about the Python-3000
mailing list