PEP 276 Simple Iterator for ints (fwd)
David Eppstein
eppstein at ics.uci.edu
Mon Dec 10 17:15:46 EST 2001
In article <9v3b7u$f0ato$1 at fido.engr.sgi.com>, pj at sgi.com (Paul Jackson)
wrote:
> Let me try this tack -- pray tell how does one verbalize
> (read out loud or subverbally) the line:
>
> for 0 <= i < 10:
I'd probably read it something like "for i between 0 and 10", throwing in
appropriate "inclusive" and "exclusive" when it's important to be precise.
Isn't x<y<z the "y between x and z" operator?
How do you read "if 0 <= i < 10" out loud? I would probably read it as
"if i is between 0 and 10". Trying to sound out the symbols literally
produces excess verbosity and bad grammar, and trying to correct the bad
grammar produces something more closely resembling the C syntax "if (0 <=
i && i < 10)".
Besides, this isn't Cobol, it doesn't have to sound like English.
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list