[Python-Dev] Re: PEP 318: Decorators last before colon (original) (raw)

Guido van Rossum guido at python.org
Wed Mar 31 14:22:06 EST 2004


This looks ugly to me. I do have top level functions that would use decorators because those functions will be put into a class as classmethods and this class will be put into sys.modules instead of the original module. Replacing

def foo(cls): ... foo = classmethod(foo) with if True: [classmethod] def foo(cls): ... doesn't look that attractive to me.

You won't have to do that except in interactive mode. How often do you type functions that need decorators interactively?

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list