Maybe, just maybe @decorator syntax is ok after all
Michael Ekstrand
python at elehack.net
Mon Aug 9 11:17:16 EDT 2004
On Sunday 08 August 2004 18:28, Mark Bottjer wrote:
> Having all this stuff before the *name* of the thing being defined is
> distracting. First tell me what it's *called*, then I'll decide if I
> want to know more or not.
Much of that can be accomplished stylistically in the way comments are
written (granted, that doesn't accomplish much for existing code that
doesn't follow such conventions). But, for example, in my C/C++ code, I
always have comments before my functions like so:
/*
* FooClass::foo()
*
* Fooifies the FooClass instance
*/
int FooClass::foo(int parm1, char parm2, char *spam_name)
...
Much of the problem (in any language, then) goes away. You still run
into problems with existing code, though.
-Michael
More information about the Python-list
mailing list