Re: decorators - more than just syntactic sugar

2007-08-14 Thread BJörn Lindqvist
On 8/13/07, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > BJörn Lindqvist wrote: > > > unpedagogically not separated from ordinary functions. > > Decorators _are_ ordinary functions. Remember the "syntactic sugar" > in this thread? Remember also "that syntactic sugar is important." Case in poin

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Michele Simionato
On Aug 13, 7:46 pm, Alexander Schmolck <[EMAIL PROTECTED]> wrote: > Michele Simionato <[EMAIL PROTECTED]> writes: > > Well, I argued may times that syntactic sugar is important (all Turing > > complete languages differs by syntactic sugar only) > > Although I agree that "mere" syntactic sugar matte

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Bjoern Schliessmann
BJörn Lindqvist wrote: > unpedagogically not separated from ordinary functions. Decorators _are_ ordinary functions. Remember the "syntactic sugar" in this thread? Regards, Björn -- BOFH excuse #338: old inkjet cartridges emanate barium-based fumes -- http://mail.python.org/mailman/listin

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Alexander Schmolck
Michele Simionato <[EMAIL PROTECTED]> writes: > On Aug 11, 8:30 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote: >> Hi, >> >> are decorators more than just syntactic sugar in python 2.x and what >> about python 3k ? > > Well, I argued may times

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Duncan Booth
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 11 Aug 2007 20:30:54 +0200, Helmut Jarausch wrote: > >> are decorators more than just syntactic sugar in python 2.x and what >> about python 3k ? > > They are just syntactic sugar. > >

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Duncan Booth
"BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > On 8/11/07, Helmut Jarausch <[EMAIL PROTECTED]> wrote: >> How can I find out the predefined decorators? > > There are two in the standard library, @classmethod for declaring > class methods and @staticmethod for declaring static methods. They are > l

Re: decorators - more than just syntactic sugar

2007-08-13 Thread BJörn Lindqvist
On 8/11/07, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > How can I find out the predefined decorators? There are two in the standard library, @classmethod for declaring class methods and @staticmethod for declaring static methods. They are listed at the built ins page http://docs.python.org/dev/li

Re: decorators - more than just syntactic sugar

2007-08-12 Thread Kay Schluehr
On Aug 11, 8:30 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > How can I find out the predefined decorators? I dare to say that's not easy. Since decorators are just(?) syntactical sugar they don't obtain a particular semantics expressed by distinctive declarative elements. Unlike generators wh

Re: decorators - more than just syntactic sugar

2007-08-12 Thread Michele Simionato
On Aug 11, 8:30 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Hi, > > are decorators more than just syntactic sugar in python 2.x and what > about python 3k ? Well, I argued may times that syntactic sugar is important (all Turing complete languages differs by syntactic suga

Re: decorators - more than just syntactic sugar

2007-08-11 Thread Marc 'BlackJack' Rintsch
On Sat, 11 Aug 2007 20:30:54 +0200, Helmut Jarausch wrote: > are decorators more than just syntactic sugar in python 2.x and what > about python 3k ? They are just syntactic sugar. @spam def ham(): pass is the same as def ham(): pass ham = spam(ham) > How can I fin

decorators - more than just syntactic sugar

2007-08-11 Thread Helmut Jarausch
Hi, are decorators more than just syntactic sugar in python 2.x and what about python 3k ? How can I find out the predefined decorators? Many thanks for your help, Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany -- http://mail.python.org