Fredrik Tolf <python-list@python.org> wrote: >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?
The only way is to read the documentation for the function (or, the source code). Can you be a little more specific about what you're trying to do? Can you post your code? -- http://mail.python.org/mailman/listinfo/python-list