From: Sam Roberts Date: 2004-01-22T06:12:37+09:00 Subject: Re: New to Python: my impression v. Perl/Ruby Quoteing ggarramuno@aol.com, on Thu, Jan 22, 2004 at 05:59:58AM +0900: > > for i in (0..i); something; end > > to me has a bunch of advantages over times, step and the such. With the above > construct you know that: > a) i has to be a number Are you sure? Can't i be a RegEx? If not, the .. operator is a special case. Most operators are user definable: j = i + 1 Is i necessarily a number? Nope. What does that statement do? Depends on what i is! And j, for that matter. Why is i.times { ... } any more or less confusing than c.each { ... } or indeed o.do_me { ... } Unless you know the type of the object, you don't know what the method does. Of course, there are naming conventions (#each, #times) for methods with commonly similar behaviour. This is the kind of thing people who don't like OO at all, preferring procedural languages, say about OO ("you never know what the call really does"). Well, that's an ancient flame war, but if you're using an OO language, I'd think you'd be on the OO side of the argument by now... Sam