[Python-Dev] PEP 318: Decorators last before colon (original) (raw)
Josiah Carlson jcarlson at uci.edu
Tue Mar 30 12:50:47 EST 2004
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] Re: Rich comparisons
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
using: classmethod def func(arg1, arg2): pass
The one major problem that i can see with this kind of syntax is that it is a /special case/ when standard Python block structure does not apply.
At least when using 'with' (which I'm not particularly fond of), block structure applies, and makes a moderate amount of sense in Python. The above 'using' keyword and organization lacks any sort of Pythonic flavor (IMO).
If we were to stick with standard Python block structure, the 'using' syntax should really be...
using: classmethod def funct(arg1, arg2): pass
I think this syntax makes more conceptual sense, sticks with standard Python block structure, etc. However, I think that what Ka-Ping has listed as case 'c' makes measureably more sense than any nested or non-nested block structure for decorators.
- Josiah
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] Re: Rich comparisons
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]