Priit Laes wrote:
Ühel kenal päeval, L, 2010-03-27 kell 07:41, kirjutas Toon Verstraelen:
Hello,

Could someone please review the patches of issue1356?
http://code.google.com/p/sympy/issues/detail?id=1356

IMHO, it would be more pythonic if it returns ValueError instead of
TypeError when it encounters invalid kwarg.

A TypeError is what python raises when wrong keyword arguments are given to a function with regular kwargs.

>>> def fun(a=1):
...     print a
...
>>> fun(b=3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: fun() got an unexpected keyword argument 'b'

That said, the distinction between TypeError and ValueError is not always clear to me. Without this example, I would have gone for a ValueError too.


And while you are at it, please wrap the lines in evalf docs ;)


I'll include it in the patch.

--
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patc...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en.

Reply via email to