[Python-Dev] PEP 318: Decorators last before colon (original) (raw)
Guido van Rossum guido at python.org
Wed Mar 31 13:26:10 EST 2004
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] PEP 318: Decorators last before colon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've produced a patch for my version:
python.org/sf/926860
This patch (deco.diff) patches compile.c to recognize the following form of decorators:
[list_of_expressions] def func(args): ...
The list of expressions should contain at least one element and should not be a list comprehension, otherwise no special treatment is taken. (An empty list has no effect either way.)
There's a simple test suite, Lib/test/test_decorators.py.
I don't expect to have time to discuss this until tonight.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] PEP 318: Decorators last before colon
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]