Re: Code block function syntax, anonymous functions decorator

2008-02-08 Thread castironpi
On Feb 8, 1:08 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Feb 8, 6:50 am, [EMAIL PROTECTED] wrote: > > > > > > > Sometimes, it's more appropriate to write > > > @call > > def f(): > >    normal_suite() > > > than > > > def f(): > >    normal_suite() > > f(). > > > It's clearer to the eye

Re: Code block function syntax, anonymous functions decorator

2008-02-07 Thread Arnaud Delobelle
On Feb 8, 6:50 am, [EMAIL PROTECTED] wrote: > Sometimes, it's more appropriate to write > > @call > def f(): >    normal_suite() > > than > > def f(): >    normal_suite() > f(). > > It's clearer to the eye and reader, and truer to the meaning of the > code.  From reading the docs, it's pretty clear

Re: Code block function syntax, anonymous functions decorator

2008-02-07 Thread castironpi
On Feb 7, 7:13 pm, [EMAIL PROTECTED] wrote: > On Feb 7, 2:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > > > > Jean-Paul Calderone schrieb: > > > > On Wed, 06 Feb 2008 23:59:27 +0100, "Diez B. Roggisch" > > > <[EMAIL PROTECTED]> wrote: > > >> [EMAIL PROTECTED] schrieb: > > >>> def run

Re: Code block function syntax, anonymous functions decorator

2008-02-07 Thread castironpi
On Feb 7, 2:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Jean-Paul Calderone schrieb: > > > > > > > On Wed, 06 Feb 2008 23:59:27 +0100, "Diez B. Roggisch" > > <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] schrieb: > >>> def run3( block ): > >>>    for _ in range( 3 ): > >>>       bloc

Re: Code block function syntax, anonymous functions decorator

2008-02-07 Thread Diez B. Roggisch
Jean-Paul Calderone schrieb: > On Wed, 06 Feb 2008 23:59:27 +0100, "Diez B. Roggisch" > <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >>> def run3( block ): >>>for _ in range( 3 ): >>> block() >>> >>> run3(): >>>normal_suite() >>> >>> Introduces new syntax; arbitrary funct

Re: Code block function syntax, anonymous functions decorator

2008-02-06 Thread castironpi
On Feb 6, 4:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > > > def run3( block ): > >    for _ in range( 3 ): > >       block() > > > run3(): > >    normal_suite() > > > Introduces new syntax; arbitrary functions can follow 'colon'. > > > Maintains reada

Re: Code block function syntax, anonymous functions decorator

2008-02-06 Thread castironpi
On Feb 6, 8:10 pm, [EMAIL PROTECTED] wrote: > On Feb 6, 5:45 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > > > > > > On Wed, 06 Feb 2008 23:59:27 +0100, "Diez B. Roggisch" <[EMAIL PROTECTED]> > > wrote: > > > >[EMAIL PROTECTED] schrieb: > > >> def run3( block ): > > >>    for _ in range(

Re: Code block function syntax, anonymous functions decorator

2008-02-06 Thread castironpi
On Feb 6, 5:45 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Wed, 06 Feb 2008 23:59:27 +0100, "Diez B. Roggisch" <[EMAIL PROTECTED]> > wrote: > > > > > > >[EMAIL PROTECTED] schrieb: > >> def run3( block ): > >>    for _ in range( 3 ): > >>       block() > > >> run3(): > >>    normal_suit

Re: Code block function syntax, anonymous functions decorator

2008-02-06 Thread Jean-Paul Calderone
On Wed, 06 Feb 2008 23:59:27 +0100, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] schrieb: >> def run3( block ): >>for _ in range( 3 ): >> block() >> >> run3(): >>normal_suite() >> >> Introduces new syntax; arbitrary functions can follow 'colon'. >> >> Maintains re

Re: Code block function syntax, anonymous functions decorator

2008-02-06 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > def run3( block ): >for _ in range( 3 ): > block() > > run3(): >normal_suite() > > Introduces new syntax; arbitrary functions can follow 'colon'. > > Maintains readability, meaning is consistent. > > Equivalent to: > > def run3( block ): >for _ in

Code block function syntax, anonymous functions decorator

2008-02-06 Thread castironpi
def run3( block ): for _ in range( 3 ): block() run3(): normal_suite() Introduces new syntax; arbitrary functions can follow 'colon'. Maintains readability, meaning is consistent. Equivalent to: def run3( block ): for _ in range( 3 ): block() @run3 def anonfunc(): norm