> No worries. I appreciate you clarifying your viewpoint. You may not
> like what you get if you don't give your opinion.

Thanks.

> I am imcluding the f({x:pi,y:4}) syntax because Ondrej is right about
> the limitations of the f(x=pi,y=4) syntax, and I think that this
> method of substitution may prove to be a popular shorthand for subs.

This is fine - I forgot that this case does solve the limitations of
the f(x=10,y=4) syntax.

>> +        >>> f([(x,pi),(y,2)])
>> +        1 + 2*pi
>>
>> I am -1 on this.  Try to forget about subs for a second.  Most new
>> users will want to use a function call syntax before they do a subs (I
>> am thinking of my students in the physics department).  This syntax is
>> _very_ confusing for someone expecting function calls to behave like
>> they do in math.
>
> I don't have a strong opinion on this and I can see how this may lead
> to confusion for someone who is a casual user of sympy, so I have
> taken your suggestion and removed the dictionary of pairs option in
> the new patch I submitted to the thread.

Thanks, I think this is an improvement.

> Sometimes it is nice to have multiple ways to do something. I was
> recently looking at using sympy with Mako to embed calculations in a
> LaTeX document. The Mako syntax is fairly lightweight and easy to
> used. For example, if you have the sympy expression f=x+y you can used
> $(latex(f)) to print out the latex version of 'x+y'. I wanted to
> things like ${latex(f) + '=' + latex(f({x=1,y=2}))}, unfortunately
> Mako does not support brackets {} inside a ${...} expression. It was
> convenient that the dictionary approach was supported. I personally
> don't mind have a few ways to do something as long as they are clean
> (easy to use and make sense), reasonably documented, and prove
> convenient under common use cases. Not sure if the dictionary of pairs
> fits that category, but it did happen to help in the case of Mako.

Very, very true and this is always a careful balancing act.
Especially because you can't always imagine the ways in which users
will want to use your code.

I guess only one other thing needs to be resolved:  what do people
think about my .bindings proposal?  Obviously *I* think it (I an open
to variants of it) is a good idea, but I really would like to hear
from others.  Also, once Lance finishes this patch, I don't mind doing
the implementation of .bindings if there is support for it.

Cheers,

Brian

PS - I am _really_ looking forward to having these things in sympy!!!

> -Lance
> >
>

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

Reply via email to