>> Exactly, and if you use idiom func(*args, **kwargs) you can distinguish >> all the usage cases: >> >> >>> def func(*args, **kwargs): > > Nice... but I would still like to be able to specify the key's default > value in the func signature, and in this case this would not be
The workaround I have seen for this is to simply put an alternative function signature in the docstring. Wx, for example, takes this approach to document the default values for things that actually arrive in **kwargs. For an example, look at wx.Frame.__init__. It looks a little awkward but it's perfectly clear what it means and why it was done. -- http://mail.python.org/mailman/listinfo/python-list