Make 'def' and 'class' usable within expressions

Skip Montanaro skip at pobox.com
Thu Mar 25 10:55:06 EST 2004


    >> What I don't like about the third alternative is the subtle
    >> distinction between parentheses and square brackets.  It seems like
    >> newbies would have a hard time with it, as would advanced programmers
    >> who are looking over a new code base.

    Thomas> That may be true, especially for classes.  But as understand it,
    Thomas> the main purpose of PEP 318 is for function decorators, not
    Thomas> class decorators.  And for functions it is clearer, since you
    Thomas> always have a parameter list.

I'm working on changes to PEP 318 which incorporate class decorators.
Michael Hudson's latest patch supports them.

Skip




More information about the Python-list mailing list