decorator J4 - any objections?
martindemello at yahoo.com
Sat Aug 21 12:20:20 CEST 2004
Paul Rubin <http://email@example.com> wrote:
> Martin DeMello <martindemello at yahoo.com> writes:
> > > def func(arg1, arg2)
> > > @version("Added in 2.4")
> > > @returns(None):
> > >
> > > """Docstring could be here, or in decorator part above"""
> > > # body goes here
> > It's really nice to have an outdented marker for when the actual
> > function body begins.
> I don't really see why, but the decorators don't have to be indented:
> def func(arg1, arg2)
> -version("Added in 2.4")
> """Docstring could be here, or in decorator part above"""
> # body goes here
> I guess that's ugly though.
Yep. What I love about J4 is it lets you scan a file very quickly,
jumping from function to function and to the body when you find the one
you want. Very little visual clutter.
More information about the Python-list