A replacement for lambda

Kay Schluehr kay.schluehr at gmx.net
Sat Jul 30 12:07:01 CEST 2005


Paul Rubin wrote:
> "Kay Schluehr" <kay.schluehr at gmx.net> writes:
> > Examples:
> >    f = ( || x>=0 then f(x) || True then f(-x)  from (x,) )
> >    g = ( || x< 0 then self._a <-x || self._a <- 0 from (x,))
>
> Is this an actual language?  It looks sort of like CSP.  Python
> with native parallelism, mmmmm.

The syntax was inspired by OCamls pattern matching syntax:

match object with
  pattern1    ->  result1
| pattern2    ->  result2
| pattern3    ->  result3
    ...

But for Python we have to look for an expression not a statement
syntax. In order to prevent ambiguities I used a double bar '||'
instead of a single one. 

Kay




More information about the Python-list mailing list