Checking function calls

Ravi Teja webraviteja at gmail.com
Mon Mar 6 23:11:10 EST 2006


You can match if the list contains the legal number of arguments with.
func_variable.func_code.co_argcount

Type checking arguments has to be done manually since Python is a
dynamic language. Perhaps, you could try some typechecking decorators.
http://www.ilowe.net/software/typecheck/
>From the docs, this one raises TypeCheckError (not TypeError), so you
should do fine.




More information about the Python-list mailing list