A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045692.html below:

[Python-Dev] Re: decorators and 2.4

[Python-Dev] Re: decorators and 2.4 [Python-Dev] Re: decorators and 2.4Barry 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:

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

or

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

or

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

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

-------------- 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4