[Python-Dev] PEP 318: Can't we all just get along?
Barry Warsaw
barry at python.org
Thu Aug 19 17:15:47 CEST 2004
On Thu, 2004-08-19 at 06:29, Jim Fulton wrote:
> IMO, yes, although I'd happily accept both syntaxes. I can live with
> @foo to server the people who want it, but it bugs me that I have to
> write:
>
> @clasmethod
> def foo ....
>
> rather than the, to me, much more obvious and readable:
>
> def classmethod foo ...
This one doesn't really bother me, in fact, I've actually come to like
the decorator in the former position, rather than the latter. I've
rewritten my decorator code to use almost all of the proposed syntaxes,
just to see how they look or what the annoyance factor is.
I'm pretty comfortable with pie-decorators before def syntax. I think
they're a good compromise, and are quite readable /and/ writable. I
don't like pie-decorator-in-first-line syntax as much for the same
reason I don't like the former choice above: both make the decorator
less prominent in the definition, which isn't something I think you
want. The latter choice above is worse because it also hides the
function name.
I think it's important to understand that we're now down to aesthetic
choices about elegance, readability, ease of use, etc. For those
reasons, we'll never agree because everyone has different tastes.
Python represents Guido's aesthetic in language design, and we all agree
that he gets most such decisions right, so I trust him on this one too
-- and I was /not/ a pie-decorator fan originally.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040819/53c8d5e4/attachment.pgp
More information about the Python-Dev
mailing list