[Python-Dev] Class decorators (original) (raw)
Fred L. Drake, Jr. fdrake at acm.org
Fri Mar 31 20:48:50 CEST 2006
- Previous message: [Python-Dev] Class decorators
- Next message: [Python-Dev] gmane.comp.python.devel.3000 has disappeared
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [Python-Dev] Class decorators
- Next message: [Python-Dev] gmane.comp.python.devel.3000 has disappeared
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]