PEP 318: Can't we all just get along?

Ville Vainio ville at spammers.com
Wed Aug 18 13:33:13 EDT 2004


>>>>> "Kevin" == Kevin Smith <Kevin.Smith at sas.com> writes:

    Kevin> Bear with me, but I'd like to propose one more syntax that
    Kevin> is simple, easy for newbies to understand, and nowhere near
    Kevin> as powerful as the current PEP's syntax.  However, it
    Kevin> doesn't add incoherent, arbitrary syntax either.

    Kevin> def classmethod foo(x, y, z):
    Kevin>    pass


    Kevin> Once again, no expressions.  I know that this isn't going
    Kevin> to solve everyone's type-checking, metadata, and function
    Kevin> attribute problems, but let's face it, using this PEP for
    Kevin> all of those things just creates ugly syntax.  There must
    Kevin> be more Pythonic ways to do those things in their own PEPs.

Python is not anymore in the blissful stage of being able to
incorporate zillions of features that could be provided by a single
syntactic addition, and relatively comfortably as well. Long
decorators w/ arguments is where the decorator syntax is going to pay
off.

I don't even use static/classmethods, but I can imagine several
frameworks can use parametrized decorators to their advantage.

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list