Since when is elegance a dirty word? Elegance is the soul of good programming. A simple and graceful solution to the widest number of cases, efficient and easy to understand in application. Sometimes subtle, but always beautiful.
In language design, software architecture, algorithms, it is the rushing light of clarity that banishes dark and smelly corners. It's side effects are many--reusable code, effortless speed, painless maintenance, reduced complexity. The dreams shared by physicists, mathematicians, and engineers, are dreams of elegance. It is heartbreaking to see a concise and useful term maligned by dense one-liners, which are seldom anything except hard to read. Simple and short ain't the same thing. And having indulged in possibly very off-topic interlude, let me point out that recognizing a donut when you see it, doesn't make you a baker. Trust me, I'm not baking donuts. And judging by the amount of Escher-like pretzels that continute to be baked in the world, we have a long ways to go before we get more than the occasional sighting or passing whiff of something sweet and round with a hole in the middle. . Take care, Andrew On 10/28/05, Carroll, Barry <[EMAIL PROTECTED]> wrote: > Kent Johnson <[EMAIL PROTECTED]> wrote: > > <<snip>> > > >>PS Don't get too crazy about eliminating intermediate variables, they can > >>make the code more readable. > >> > >>Kent > > I agree. When writing for keeps (i.e. production code) I prefer clarity and > ease of maintenance over 'elegance' or 'trickiness'. This exercise is > intended, in part, to sharpen my understanding of Python idioms. If I can > write highly idiomatic code that works, chances are better that I will be > able to decipher it when I come across it elsewhere. > > Barry > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor