[Python-Dev] Call for defense of @decorators (original) (raw)

Matteo Dell'Amico della at linux.it
Fri Aug 6 14:32:13 CEST 2004


Il ven, 2004-08-06 alle 00:52, Mark Russell ha scritto:

Good thought. Or even something like:

|staticmethod| def foo(): pass I just tried converting testdecorators.py to this syntax, and it looks quite nice to my eye.

I like it.

Probably, I'd like even more:

<staticmethod, foomethod> def foo(): pass

I think these kind of proposal is extetically pleasing to my eye, has more or less all the pros of the list-before-def syntax, and wouldn't have its main drawback: the "magic" behaviour of evaluating a string, since <a, b, c> is no python object.

A drawback would be that no mainstream language uses this syntax, but I think the C# one is sufficiently similar.

(and excuse me for proposing Just Another Syntax :-))

-- Ciao, Matteo



More information about the Python-Dev mailing list