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

Simon Percivall s.percivall at chello.se
Fri Aug 6 00:29:05 CEST 2004


+1 on @decorator style for being clear, unambiguous and useful (and not bad to look at once you get used to it).

clear: * it's more visible and less messy than any of the before-/after-/behind-def style decorations; * it stands out. this is a good thing.

unambiguous: unlike the other viable prefix notation it makes 2.4 code special.

useful: just having a special decoration syntax makes it useful.

decorations can make the behaviour of a function or class seem more magic than otherwise, but at least the @decoration style makes it more obvious that something is going on.

On 2004-08-05, at 18.36, Guido van Rossum wrote:

[...] you might want to say something in public in defense of @decorators.



More information about the Python-Dev mailing list