Re: [Tutor] Code Readability (was: Recursion and List Comprehensions)

2005-10-29 Thread Andrew P
Sorry. *blush* That was some late Friday night craziness. I just looked at the code being discussed: retList=[word[pos]+item for item in permute3(word[0:pos]+word[pos+1:])] And really didn't want to anybody to confuse that with Python's idea of elegance. List comprehensions can get pretty hor

Re: [Tutor] Code Readability (was: Recursion and List Comprehensions)

2005-10-29 Thread Danny Yoo
> > 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 bett

Re: [Tutor] Code Readability (was: Recursion and List Comprehensions)

2005-10-29 Thread Andrew P
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

[Tutor] Code Readability (was: Recursion and List Comprehensions)

2005-10-28 Thread Carroll, Barry
Kent Johnson <[EMAIL PROTECTED]> wrote: <> >>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