Checking for invalid keyword arguments?

Peter Hansen peter at engcorp.com
Mon Sep 29 09:11:09 EDT 2003


Roy Smith wrote:
> 
> I've got a function that takes a couple of optional keyword arguments.
> I want to check to make sure I didn't get passed an argument I didn't
> expect.  

By the way, you didn't explain why you don't want to get passed arguments
you didn't expect.  Can't you simply ignore them?  That way you can 
easily expand the API in future versions yet maintain a certain amount
of compatibility.

-Peter




More information about the Python-list mailing list