By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

wiki update: decorator syntax breakdown

P: n/a
Just wanted to let everyone know that I went through the wiki and
tried to consolidate some of the advantages/disadvantages of the
various syntax decisions:

http://www.python.org/cgi-bin/moinmoin/PythonDecorators (section 7)

Hopefully I've extracted most of the important points from the various
example syntaxes.

Steve
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Steven Bethard wrote:
Just wanted to let everyone know that I went through the wiki and
tried to consolidate some of the advantages/disadvantages of the
various syntax decisions:


Cool!

*rummage* *rummage*

Hm. Just as a note, I didn't spot the following (recent?) variant:

class C:
def c(self):
meta:
classmethod
doc('This is a function!')
pass

For example, see the "Decorators proposal" thread.

Thanks for all the hard work.

-- Mark
Jul 18 '05 #2

P: n/a
Mark Bottjer <ma**********@hotmail.com> wrote in message news:<41********@nntp.zianet.com>...
Hm. Just as a note, I didn't spot the following (recent?) variant:

class C:
def c(self):
meta:
classmethod
doc('This is a function!')
pass


I think this would fall under:
Indicator: keyword: 'meta'
Location: post-def
List Notation: One per line
Indentation: Indent decorators only

Right? I added 'meta' to the keyword section.

Steve
Jul 18 '05 #3

P: n/a
Steven Bethard wrote:
Mark Bottjer <ma**********@hotmail.com> wrote in message news:<41********@nntp.zianet.com>...
class C:
def c(self):
meta:
classmethod
doc('This is a function!')
pass

I think this would fall under:
Indicator: keyword: 'meta'
Location: post-def
List Notation: One per line
Indentation: Indent decorators only

Right? I added 'meta' to the keyword section.


I think so, yes. Thanks.

-- Mark
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.