Beautiful Code in Python?

castironpi at gmail.com castironpi at gmail.com
Tue Mar 4 02:11:43 CET 2008


On Mar 3, 4:30 pm, "sjdevn... at yahoo.com" <sjdevn... at yahoo.com> wrote:
> On Mar 2, 1:18 pm, castiro... at gmail.com wrote:
>
> > On Mar 2, 12:01 pm, John DeRosa <stug... at qwest.net> wrote:
>
> > > On Mon, 3 Mar 2008 01:23:32 +0900, js <ebgs... at gmail.com> wrote:
> > > >Hi,
>
> > > >Have you ever seen Beautiful Python code?
> > > >Zope? Django? Python standard lib? or else?
>
> > > >Please tell me what code you think it's stunning.
>
> > > Just about any Python code I look at.
>
> > Decorators, with, and namedtuple.
>
> IMO, decorators are functional but far from beautiful.  They're a
> special, somewhat ugly syntax for something that was already handled
> by normal constructs ("foo=classmethod(foo)") that you didn't need
> extra knowledge to understand.
>
> On balance I think it's worth it in order to get those "declarations"
> up by the function defs, but it's sort of a tradeoff of magical non-
> explicitness for pragmatism over purity.  A worthwile tradeoff, but
> not what I'd ever call beautiful.

Someone study architecture.  What are the Palmer House, the Rookery,
and the Lyric Opera?



More information about the Python-list mailing list