Checking function calls

Fredrik Tolf fredrik at dolda2000.com
Tue Mar 7 04:37:07 CET 2006


If I have a variable which points to a function, can I check if certain
argument list matches what the function wants before or when calling it?

Currently, I'm trying to catch a TypeError when calling the function
(since that is what is raised when trying to call it with an illegal
list), but that has the rather undesirable side effect of also catching
any TypeErrors raised inside the function. Is there a way to avoid that?

Fredrik Tolf





More information about the Python-list mailing list