iters on ints? (reducing the need for range/xrange)

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sat Nov 10 06:12:58 EST 2001


9 Nov 2001 20:03:28 -0800, Michael Robin <me at mikerobin.com> pisze:

> I was just saying that I think in most other languages that specify
> numeric targets of "for" without extra syntax or an explicit test
> expression the endcases are inclusive.

Indeed, but Python already uses exclusive end in its current
spelling of 'for i = 0 to 10', i.e. 'for i in range(11):'.
It would be no more confusing that it's currently.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^
QRCZAK



More information about the Python-list mailing list