Alternative decorator syntax - POLL RESULTS SO FAR - ARE WEDONE?

Peter Hansen peter at engcorp.com
Sun Aug 22 08:37:44 EDT 2004


Robert Brewer wrote:

> Paul Rubin wrote:
>>Looks like "declare" to me ;-)
> 
> I agree, for reasons which will become clear in the proposal draft.
> 
> I'd be most interested to hear arguments _against_ "declare", if there
> are any.

Somehow "declare" suggests to me a much stronger meaning than
what these decorators are about.  In other languages, you
actually "declare" data types or functions.  Decorators are
not so significant, as they merely decorate the function
to-be-defined.

"using" seems best to me, largely because it is fairly non-specific
(i.e. doesn't have strong connotations of one specific type of
decoration, such as 'staticmethod' versus 'author' or some such)
and because, as Francesco pointed out, it does seem to introduce
a following required clause, where "decorate" and "declare"
do not (though for different reasons).

-Peter



More information about the Python-list mailing list