Re: Anonymus functions revisited : tuple actions

2005-03-26 Thread Reinhold Birkenfeld
Ron_Adam wrote: > On Fri, 25 Mar 2005 18:58:27 +0100, Reinhold Birkenfeld > <[EMAIL PROTECTED]> wrote: > >>Ron_Adam wrote: >> >>> What if you could: >>> >>> x = lambda{ x, y: x+y} >>> Hmm comma creates a problem here. so... >> > from __future__ import braces >>SyntaxError: not a chance

Re: Anonymus functions revisited : tuple actions

2005-03-25 Thread Ron_Adam
On Fri, 25 Mar 2005 18:58:27 +0100, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >Ron_Adam wrote: > >> What if you could: >> >> x = lambda{ x, y: x+y} >> Hmm comma creates a problem here. so... > from __future__ import braces >SyntaxError: not a chance > >Reinhold ;) LOL, :-)

Re: Anonymus functions revisited : tuple actions

2005-03-25 Thread Reinhold Birkenfeld
Ron_Adam wrote: > What if you could: > > x = lambda{ x, y: x+y} > Hmm comma creates a problem here. so... >>> from __future__ import braces SyntaxError: not a chance >>> Reinhold ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Anonymus functions revisited : tuple actions

2005-03-25 Thread Ron_Adam
On 24 Mar 2005 22:16:10 -0800, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: >It's all developed during this discussion. Sometimes I'm a bit >surprised were it goes. I enjoy exploring ideas this way. Many times it leads to dead ends or you just end up with a long way back to where you started, but so

Re: Anonymus functions revisited : tuple actions

2005-03-25 Thread George Sakkis
"Kay Schluehr" <[EMAIL PROTECTED]> wrote: > To make my intention clear for another time, also for George who > mistrusts these exercises alltogether. I want to derive a syntax and > semantics for anonymus functions ( called "tuple-actions" ) that are > generalizations of rules that are already use

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread Kay Schluehr
Ron_Adam wrote: > On 24 Mar 2005 01:58:48 -0800, "Kay Schluehr" <[EMAIL PROTECTED]> > wrote: > > >I personally don't like using exec and eval for stuff different from > >evaluating user input. > > I lean the other way. I never want to use user impute for eval and > exec. Way too risky. Well a Py

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread Ron_Adam
On 24 Mar 2005 01:58:48 -0800, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: >I personally don't like using exec and eval for stuff different from >evaluating user input. I lean the other way. I never want to use user impute for eval and exec. Way too risky. But limited use, that is not user input,

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread Ron
On Thu, 24 Mar 2005 12:07:44 -0500, "George Sakkis" <[EMAIL PROTECTED]> wrote: >"Kay Schluehr" <[EMAIL PROTECTED]> wrote: >> [snipped] >> >> Wouldn't it be fun to use in Python? >> >> Only drawback: does not look like executable pseudo-code anymore :( >> >> >> Regards Kay > >I don't know if it wou

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread George Sakkis
"Kay Schluehr" <[EMAIL PROTECTED]> wrote: > [snipped] > > Wouldn't it be fun to use in Python? > > Only drawback: does not look like executable pseudo-code anymore :( > > > Regards Kay I don't know if it would be fun, but it certainly doesn't look accessible to mere mortals :-) I'm not sure if th

Re: Anonymus functions revisited : tuple actions

2005-03-24 Thread Kay Schluehr
Ron wrote: > On Wed, 23 Mar 2005 06:21:30 +0100, Kay Schluehr <[EMAIL PROTECTED]> > wrote: > > >I think my proposal was more in mind of Rons modified exec than > >Pythons lambda. > > > >When George proposed his unpacking behavoir for list-comps as a pack of > >suggar: > > > >1. [x*y-z for (x,y,z=0)

Re: Anonymus functions revisited : tuple actions

2005-03-23 Thread Ron
On Wed, 23 Mar 2005 06:21:30 +0100, Kay Schluehr <[EMAIL PROTECTED]> wrote: >I think my proposal was more in mind of Rons modified exec than >Pythons lambda. > >When George proposed his unpacking behavoir for list-comps as a pack of >suggar: > >1. [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)] >

Re: Anonymus functions revisited : tuple actions

2005-03-23 Thread bruno modulix
Kay Schluehr wrote: Hi all, thanks for Your attention ! I think my proposal was more in mind of Rons modified exec than Pythons lambda. When George proposed his unpacking behavoir for list-comps as a pack of suggar: 1. [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)] I interpreted it in a subsequen