J2 decorator grammar

Bengt Richter bokr at oz.net
Sun Aug 22 01:27:59 EDT 2004


On Sat, 21 Aug 2004 17:22:43 -0700, "Robert Brewer" <fumanchu at amor.org> wrote:
[...]
>For that reason (and others), I plan not to promote any form of the word
>"decorate". We can start having that conversation now if you want. ;)
>
What about just using

    def:
        deco1
        deco2('with','parameters')
        any_expression_returning_a_callable_allowing_a_single_arg_call
    def foo():
        pass

also perhaps allowing

    def:deco1
    def foo():pass

grepping for def will then show easily what functions have "decorators"

Regards,
Bengt Richter



More information about the Python-list mailing list