[Python-Dev] Re: Re: Call for defense of @decorators

Fernando Perez fperez528 at yahoo.com
Fri Aug 6 19:50:25 CEST 2004


Tim Peters wrote:

> [Barry Warsaw]

>> In summary, I can definitely sympathize with the concern of tool authors
>> who have settled on @ as a meta-character that Python will not use.
> 
> Yup.
> 
>> I wonder how the Leo or ipython folks would feel if the only change to the
>> current implementation of PEP 318 was to change the decorator
>> introducing character.  If we can increase the community's consensus by
>> making this little change, I wouldn't oppose it.
> 
> Me neither.
> 
>> My preference then would be to use = with | and : as alternatives, in
>> that order.

Well, here's  from the ipython author...

As I've said, I can adapt to @, but it will mean a bunch of silly work (lots of
documentation changes to track), and significant disruption to a large
existing user base.  Note that ipython has made it into SuSe Professional, and
it's available for OSX via Fink, Debian, Gentoo, and several other smaller
Linux distributions, as well as WinXP/2k.  I mention this only to point out
the extent of the community which will feel this disruption, not in trying to
force anyone's hand by a 'mob argument'.

If the 'decorated line before def' approach wins in Guido's mind, and the
choice of decorator character is the only remaining question, I'd have to say
that using | (or one of the others) would definitely make my life easier.  And
that of all my users as well.

The visual effect of | when initially proposed looked surprisingly nice to me,
given its 'diagrammatic' appearance of drawing a graph between the decoration
lines and the function definition.  So FWIW, I'd say that I personally kind of
like it.  Though I tend to prefer the []-after-args-before-colon one even
better, but I don't want to get into the whole debate.  I'm trying to confine
my comments to the effects of this change on ipython, which seems to be (with
Leo) one of the worst-hit third-party tools by the '@' proposal.

I'd like to say that I greatly appreciate the fact that the python core team is
willing to keep my concerns in mind, even when it was my own choice to use @
without any promises from them.  I think in the middle of a discussion which
has sometimes strayed from the technical to the emotional, it's worth
recognizing the quality of the people we have the privilege of working with.

Best to all,

f



More information about the Python-Dev mailing list