On Tue, Feb 21, 2012 at 5:33 PM, Joachim Durchholz <[email protected]> wrote:
> Am 20.02.2012 23:07, schrieb Alan Bromborsky:
>
>> My problem is that I am a lousy speller and I spelled the commutative
>> keyword in symbol wrong!!!!
>
>
> I suspect that is because many functions look only at specific keywords and
> pass on the unknown keywords to other functions. This is very extensible but
> leaves no function with enough information to check for invalid keywords.
No, I think it's just because the functions do value =
kwargs.pop('value'), but they never check if kwargs contains unknown
values. Some functions do just pass on the **kwargs (such as
front-ends to the printers like latex()), but there's always a bottom
level where the full list of settings can be checked.
>
> Maybe each function should publish the list of keywords that it accepts.
> Which would be the list of those it implements itself, plus (recursively)
> those accepted by functions that it calls.
A good solution would be to move all functions that take options to
some kind of options manager, which would do this kind of type
checking for us (among other things).
Aaron Meurer
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.