[Python-Dev] Re: method decorators (original) (raw)
Terry Reedy tjreedy at udel.edu
Sun Mar 28 14:22:16 EST 2004
- Previous message: [Python-Dev] method decorators
- Next message: [Python-Dev] PEP 318 - posting draft
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Damien Morton" <dmorton at bitfurnace.com> wrote in message news:406706D6.1040309 at bitfurnace.com...
Has anyone proposed the current c-sharp syntax for method decorators? That is, the decorators appears before the method delcaration? Seems to me eminently more readable than trying to squeeze the decorators into the main part of the method declaration, especially so if the decorator declaration gets long.
[decorator] def method(args): body
I agree that this might look nicer than some of the current proposals. However, it is legal syntax today, with a different meaning, even if silly:
def f(): pass ... [f] [<function f at 0x00868088>]
then list is then decref'ed to 0 and gc'ed whenever. So you need something currently not legal.
Terry J. Reedy
- Previous message: [Python-Dev] method decorators
- Next message: [Python-Dev] PEP 318 - posting draft
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]