On Fri, 5 Feb 2016, Nathann Cohen wrote:
I object. It is a *very* simple mistake that has a *very* simple solution:
Any function that takes **kwargs as argument must:
1) Remove from kwargs all values it understands
2) Forward the remaining content of kwargs to a subfunction
There is no way on earth that stuff will get lost if you use this very
simple logic. Any additional keyword will raise an exception
eventually.
True, it will give an error. An error is better than silently doing
something unexpected.
But this can also be quite unfriendly to user. I have seen some strange
error messages where the error came from long chain of function calls (but
can't remeber where).
* * *
And every function accepting only size='extralarge' and size='verytiny'
should raise an exception with size='medium'.
--
Jori Mäntysalo