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/2006-March/063249.html below:

[Python-Dev] Class decorators

[Python-Dev] Class decorators [Python-Dev] Class decoratorsFred L. Drake, Jr. fdrake at acm.org
Fri Mar 31 20:48:50 CEST 2006
On Friday 31 March 2006 11:52, Phillip J. Eby wrote:
 >      class bar:
 >          @class foo
 >          def __init___(...):
 >              ...

The more I think about it, the more I like the "@class foo" syntax.  The 
existing syntax for functions doesn't have anything between the decorators 
and the "def"; having class decorators embedded within the class should still 
allow the docstring to be the first thing, so there's more distance between 
the decorator and the name being decorated.  The extra hint about what's 
being decorated is nice.


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>
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