Andrei:

>Date: Sat, 29 Oct 2005 01:13:45 +0200
>From: Andrei <[EMAIL PROTECTED]>
>Subject: Re: [Tutor] Recursion and List Comprehensions
>To: tutor@python.org
>Message-ID: <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed

<<snip>>

>There's nothing magic about writing a list comprehension - they're just 
>an inside-out way of writing a for-loop :).

<<snip>>

That was just what I needed.  Your description was clear and easy to follow.


>4 lines of perfectly readable code have become 4 lines of perfectly 
>unreadable list comprehension. Any reader interested in understanding 
>this will have to perform the exact opposite set of operations to go 
>back to the original code.

<<snip>>

I couldn't agree more.  This was a learning exercise for me.  In a real
program (one that I or someone else would have to maintain a year or so from
now) I would have stopped with the first version, with all the loops and
intermediate variables left in.  

Thanks for your help.  I really enjoy this list.  

Barry


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to