[Python-Dev] Re: method decorators (PEP 318) (original) (raw)

Robert Mollitor mollitor at earthlink.net
Sat Mar 27 21:03:03 EST 2004


On Saturday, March 27, 2004, at 06:30 PM, Paul Prescod wrote:

Anyhow, I do not believe that the two features are as unrelated as you think.

First: we do not want to introduce a new feature that will ENCOURAGE abuse. Better to introduce two features and head that off at the pass.

I agree with this.

Second: I see use cases like this:

def foo [sparkcallback] (self): @sparkrule = "DOC := HEAD BODY FOOT" ... def foo publishtoweb: @url = "/cgi-bin/directory/directory"

Excellent example. Annotations would probably be set before transformers are invoked.

Otherwise you get into a lot of this stuff:

def foopublishtoweb("http://directory/directory"):

It would be nice if transformer decorations were never allowed "arguments". It would keep that list as short and as tidy as possible.

Robert Mollitor



More information about the Python-Dev mailing list