Re: Implicit Subs Syntax - f({x:1,y:2})

2008-12-10 Thread Ondrej Certik
On Wed, Dec 10, 2008 at 4:17 AM, Lance Larsen [EMAIL PROTECTED] wrote: Finally got a few moments to put the implicit subs syntax code together and get it ready to submit. Here it is. The patch looks good to me, +1. I'll wait for others and if they are ok as well, push this in. Thanks!

Implicit Subs Syntax - f({x:1,y:2})

2008-12-09 Thread Lance Larsen
Finally got a few moments to put the implicit subs syntax code together and get it ready to submit. Here it is. -Lance # HG changeset patch # User [EMAIL PROTECTED] # Date 1228878177 25200 # Node ID dc86dcc8d059f0a2cd3eb498b595c8a45775aa92 # Parent d1019a5c66d12d524fe64359c1bd8054cab0cfa9

Re: Implicit Subs Syntax - f(x=1,y=2)

2008-11-20 Thread Andy R. Terrel
This patch doesn't treat dummies well, but I guess that can be fixed later: In [6]: a_d = Symbol('a',dummy=True) In [7]: a = Symbol('alpha',dummy=True) In [8]: f = 2*a*a_d*x In [9]: f Out[9]: 2*x*a*alpha In [10]: f(a=2) Out[10]: 2*x*a*alpha In [11]: f(a_d=2) Out[11]: 2*x*a*alpha In [12]:

Re: Implicit Subs Syntax - f(x=1,y=2)

2008-11-19 Thread Lance Larsen
Sorry if I am being a pain in the #%%, I just want to make sure that we get the desig of this right as someone else said you only get to implement __call__ once. No worries. I appreciate you clarifying your viewpoint. You may not like what you get if you don't give your opinion. The patch

Re: Implicit Subs Syntax - f(x=1,y=2)

2008-11-19 Thread Ondrej Certik
On Thu, Nov 20, 2008 at 2:18 AM, Ondrej Certik [EMAIL PROTECTED] wrote: On Wed, Nov 19, 2008 at 10:42 PM, Lance Larsen [EMAIL PROTECTED] wrote: For what it is worth, I fixed the errors in the last patch submitted. Looks like a previous patch has already been applied in main repository

Re: Implicit Subs Syntax - f(x=1,y=2)

2008-11-19 Thread Ondrej Certik
On Thu, Nov 20, 2008 at 2:22 AM, Ondrej Certik [EMAIL PROTECTED] wrote: On Thu, Nov 20, 2008 at 2:18 AM, Ondrej Certik [EMAIL PROTECTED] wrote: On Wed, Nov 19, 2008 at 10:42 PM, Lance Larsen [EMAIL PROTECTED] wrote: For what it is worth, I fixed the errors in the last patch submitted. Looks

Re: Implicit Subs Syntax - f(x=1,y=2)

2008-11-19 Thread Lance Larsen
Which patch was applied in the main repo? I did a pull from the main line and it looked like one of my original patches was included in my repository. If this wasn't from the main repo (and it sounds like it wasn't), I must have committed the hg patch locally when I was experimenting with hg

Re: Implicit Subs Syntax - f(x=1,y=2)

2008-11-19 Thread Brian Granger
This patch looks good to me. Brian -- is it ok with you as well? As much as I can tell from looking at the diff, yes, it is OK. I say go ahead, if we want to add the bindings thing later we can, but even this is a nice improvement. Brian Ondrej