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

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Fri Nov 9 14:06:05 EST 2001


Fri, 9 Nov 2001 11:01:25 -0500 (EST), Steven D. Majewski <sdm7g at Virginia.EDU> pisze:

> Don't you think that the extremely different behaviour of the last of
> these compared to the others could be a needless cause of confusion?
> 
> for i in 3,2,1: print i
> 
> for i in 3,2,:	print i
> 
> for i in 3,2:	print i
> 
> for i in 3,:	print i
> 
> for i in 3:	print i

It's already extremely different (raises an exception instead of
printing something).

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



More information about the Python-list mailing list