[Python-Dev] 2.4a2, and @decorators (original) (raw)
Guido van Rossum guido at python.org
Mon Aug 2 21:09:17 CEST 2004
- Previous message: [Python-Dev] 2.4a2, and @decorators
- Next message: [Python-Dev] 2.4a2, and @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>I would think the fact that the '[decorators]' syntax can be implemented >>in pure Python (no changes to the interpreter) for existing Python >>versions would give more weight to it.
Can it? I must've missed that. It sure sounds like an incredible hack -- how to you prevent the default behavior that the list of decorators is thrown away by the interpreter?
>>That is, if someone wants to implement a decorator that's forwards >>and backwards-compatible, that's possible with the list syntax, >>but not the @ syntax. > >.. but that also means you can still make the [decorators] syntax >work in 2.4, if you want compatibility or don't like @syntax.
But then why not just make that the default syntax, so that no migration is necessary, and only one syntax has to be learned/explained to people?
Because that syntax received significant boohs when I presented it at EuroPython.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] 2.4a2, and @decorators
- Next message: [Python-Dev] 2.4a2, and @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]