[Python-Dev] Re: Call for defense of @decorators (original) (raw)
Mark Russell marktrussell at btopenworld.com
Fri Aug 6 11:22:17 CEST 2004
- Previous message: [Python-Dev] Re: Call for defense of @decorators
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2004-08-06 at 03:46, Andrew Durdin wrote:
8. When using multiple decorators, each appears on a separate line.
No, you can put multiple decorators on a single line -- you just need a newline before the def. From test_decorators.py:
class C(object):
@funcattrs(abc=1) @staticmethod
def foo(): return 42
Probably not good style (but neither is "if cond: stmt" I guess).
Mark
- Previous message: [Python-Dev] Re: Call for defense of @decorators
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]