On Mon, Jul 6, 2009 at 5:34 AM, Toon
Verstraelen<[email protected]> wrote:
>
> Andy Ray Terrel wrote:
>> * fcode function should move to something like the following signature
>> (expr, *args, **kws) and look up the keywords, it gets too many
>> optional keywords as is.
>
> Are there convenient ways to check the validity of *args and **kwargs? The
> code
> to process *arg and **kwargs becomes daunting when done properly. The
> conventional way is actually really compact. I can not find something that can
> replace
>
> def fcode(expr, assign_to=None, precision=15, user_functions={}, human=True):
>
> without introducing ten times the amount of code. If there is no elegant way
> to
> do this, I don't see the purpose of *args and **kwargs.
Yeah I hear you. As a general rule I like to keep less than 5
arguments to a function for readability and maintainability, but the
flip side is a dispatch function with a lot of ( if !kwargs.has("foo")
). These code dispatchers seem like they will rapidly grow in number
of args so I wanted to nip that bud early, but if you feel it is too
much just drop it.
-- Andy
>
> cheers,
> Toon
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---