[Python-Dev] Re: decorators and 2.4

Barry Warsaw barry at python.org
Mon Jun 28 13:48:11 EDT 2004

On Mon, 2004-06-28 at 13:27, Jeff Bone wrote:
> Okay, this is a great and meaty example, thanks Barry.  It's the first  
> one that I've seen that is clearly not a purely declarative thing at  
> least in the abstract.  What would the proposed decorator version of  
> this look like?

Depends on which syntax Guido chooses <wink>.

I'd be able to remove all the "func = txnprop(_func)" trailers, and do
something like:

def create_list(self, listid):
    # ...


def create_list(self, listid) [txnprop]:
    # ...


def create_list(self, listid):
    # ...

All of which seem much more clear than what I currently have to do.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040628/8bf47a4b/attachment-0001.bin

More information about the Python-Dev mailing list