Re: Applying a decorator to a module

2008-11-27 Thread Steven D'Aprano
upport >> for modules. > > awWww! i'm going to quietly throw my toys out of my pram. > > ... but seriously - doesn't that strike people as... a slightly odd > omission? No. Strictly speaking, to talk about applying a decorator to a module means syntactic sugar f

Re: Applying a decorator to a module

2008-11-27 Thread Terry Reedy
Decorators are syntactic sugar. They add no functionality. @decorator def/class possibly_long_name ... abbreviates def/class possibly_long_name ... possibly_long_name = decorator(possibly_long_name) thereby warning the reader at the beginning that possibly_long_name will be rebound and avoid

Re: Applying a decorator to a module

2008-11-27 Thread Diez B. Roggisch
lkcl schrieb: On Nov 27, 7:43 pm, [EMAIL PROTECTED] wrote: lkcl> Very simple question: how do you apply a decorator to an entire lkcl> module? Function-by-function or class-by-class. There is no decorator support for modules. awWww! i'm going to quietly throw my toys out of my pram.

Re: Applying a decorator to a module

2008-11-27 Thread Arnaud Delobelle
lkcl <[EMAIL PROTECTED]> writes: > On Nov 27, 7:43 pm, [EMAIL PROTECTED] wrote: >> lkcl> Very simple question: how do you apply a decorator to an entire >> lkcl> module? >> >> Function-by-function or class-by-class. There is no decorator support for >> modules. > > awWww! i'm going to qu

Re: Applying a decorator to a module

2008-11-27 Thread skip
>> Function-by-function or class-by-class. There is no decorator >> support for modules. lkcl> ... but seriously - doesn't that strike people as... a slightly lkcl> odd omission? Decorators are still a new feature in the language and were purposely added in an incremental fashion

Re: Applying a decorator to a module

2008-11-27 Thread George Sakkis
On Nov 27, 2:54 pm, lkcl <[EMAIL PROTECTED]> wrote: > On Nov 27, 7:43 pm, [EMAIL PROTECTED] wrote: > > >     lkcl> Very simple question: how do you apply a decorator to an entire > >     lkcl> module? > > > Function-by-function or class-by-class.  There is no decorator support for > > modules. > >

Re: Applying a decorator to a module

2008-11-27 Thread lkcl
On Nov 27, 7:43 pm, [EMAIL PROTECTED] wrote: > lkcl> Very simple question: how do you apply a decorator to an entire > lkcl> module? > > Function-by-function or class-by-class. There is no decorator support for > modules. awWww! i'm going to quietly throw my toys out of my pram. ... but

Re: Applying a decorator to a module

2008-11-27 Thread skip
lkcl> Very simple question: how do you apply a decorator to an entire lkcl> module? Function-by-function or class-by-class. There is no decorator support for modules. -- Skip Montanaro - [EMAIL PROTECTED] - http://smontanaro.dyndns.org/ -- http://mail.python.org/mailman/listinfo/python

Applying a decorator to a module

2008-11-27 Thread lkcl
Very simple question: how do you apply a decorator to an entire module? an idea whose time has properly arrived is to merge pyjamas (http://pyjs.org) into web2py (http://web2py.com), and to do that, it's necessary to "identify" functions, classes, global variables and modules that should be compil