From: Gregory Millam Date: 2004-01-21T17:30:20+09:00 Subject: Re: New to Python: my impression v. Perl/Ruby Received: Wed, 21 Jan 2004 16:59:59 +0900 And lo GGarramuno wrote: > i = 10 # somewhere out there > > # and then somewhere else... > i.times do something end > > is confusing as you have no clue what class i is and as such, no idea > what times may be doing. > In those cases, a for or while loop is preferable and should be > enforced, in my opinion. > In my experience, it is much more common for algorithms to be looping > involving arbitrary numbers stored in variables than predetermined > times, so I also tend to agree that such constructs are cute but not > something I'd likely use often in real code. Ever since I started using ruby, I don't believe I've actually looped based on numbers for actual programming. Why should I, since there is usually a number of better ways to do so, especially when doing it the 'ruby way'. String's "each_byte" and Array's 'each' method defeats over 99% of the 'for (i=0;i