[Python-Dev] Call for defense of @decorators (original) (raw)
Bob Ippolito bob at redivi.com
Fri Aug 6 00:39:39 CEST 2004
- Previous message: [Python-Dev] Call for defense of @decorators
- Next message: [Python-Dev] Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Aug 5, 2004, at 6:33 PM, Martin v. Löwis wrote:
Edward K. Ream wrote:
Thank you, Martin. I think Python will be the better for holding itself to higher standards. I was somewhat too quick critizing the documentation, though: http://www.python.org/dev/doc/devel/ref/function.html does explain syntax and semantics, and there are testcases as well. So it's just the PEP that needs updating (a section in whatsnew also needs to be drafted). Then, of course, the text saying that "@" is not used needs to go. I wonder whether replacing "@" with "!" or "%" would do any good... In fact, any binary operator would work - Objective-C does use "+" and "-" at the beginning of a line...
Except + and - would be valid Python syntax already ;) For reference, in Objective-C, + means class method and - means instance method. This is not decoration because they are in separate namespaces; +class methods are basically instance methods on an implicit metaclass. In Objective-C, + and - are roughly equivalent to Python's "def" keyword.
Aesthetically I much prefer @ over ! or %. !looks !bad !next !to !text !because !it !doesn't !stand !out and %makes %me %think %of %comments %in %another %language.
-bob
- Previous message: [Python-Dev] Call for defense of @decorators
- Next message: [Python-Dev] Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]