> If 'callable' is to stay, then in order to pull its weight it needs to
> grow to provide a way to check "callable with the following signature"
> -- at the very least in terms of numbers and names of arguments,
> though (if py3k does gain some syntax for specifying argument types)
> it might do more.  E.g., just "callable(fun)" should mean "fun appears
> to be callable without arguments, e.g. I believe that doing 'fun()'
> will not result in a TypeError from the call operation itself", while
> "callable(fun, int, zap=list[int])" should mean "fun appears to be
> callable with one positional argument that's an int and an argument
> named zap that is a list of ints", i.e. the apparently-acceptable call
> is of some form such as "fun(23, [4, 5])" [[presumably using object as
> a placeholder for unchecked-types]] -- so that for example a
> 
+1 on the concept.
If it doesn't go in __builtin__, maybe it can go somewhere in the stdlib so 
that 
people don't have to reimplement it badly.

BC

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to