Thoughts on PEP284

Gerrit Holl gerrit at nl.linux.org
Tue Sep 23 07:16:20 EDT 2003


Alex Martelli wrote:
> >> Also, one extra feature is that the loop can be infinite (which range
> >> and xrange cannot achieve)...
> >>
> >>   for i in int [0:] :
> 
> No way, Jose -- now THAT would break things (in admittedly rare
> cases -- a method expecting a list and NOT providing an upper bound
> in the slicing).  I'd vote for this to be like int[0:sys.maxint+1]
> (i.e., last item returned is sys.maxint).

This one breaks the int/long unification. In an ideal unification
of ints and longs, sys.maxint would not exist any more, and the
upper bound would be seemingly random.

Gerrit.

-- 
131. If a man bring a charge against one's wife, but she is not
surprised with another man, she must take an oath and then may return to
her house.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/





More information about the Python-list mailing list