On 01/14/10 10:29, Hugo Arts wrote:
> On Thu, Jan 14, 2010 at 12:05 AM, Alan Gauld <alan.ga...@btinternet.com> 
> wrote:
>> >
>> > I prefer the next() approach.
> Rightfully so. IMO, The while loop with readline is basically the C
> version of that, for the poor people who don't have iterators.

I would often prefer while loop with next() though. Writing a state
machine with for-loop can become quite messy because of the implicit
next() on each iteration.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to