Q's: pythonD and range(1,12)
Scott David Daniels
scott.daniels at acm.org
Mon Mar 13 19:49:35 EST 2006
John Savage wrote:
> Could someone please explain the rationale behind python designers' thinking
> in deciding the function "range(1,12)" should return the sequence 1 to
> 11 rather than the more intuitively-useful 1 to 12??
Essentially, it has to do with the decision to have range(5) mean the
list [0, 1, 2, 3, 4] (which is five elements long). Any choice will
please some and offend others; this one in Python has no chance of
changing.
> After downloading the substantial distribution .zip file, I'm intrigued
> to find it includes 3 files of identical size and creation date, differing
> apparently only in name (python, python2.4 and python24.exe) and each of
> exactly 2,597,888 bytes. What possible purpose could be served by such
> triplication that couldn't more efficiently be done by other means?
You obviously know what and where PythonD came from, but we don't.
--
-Scott David Daniels
scott.daniels at acm.org
More information about the Python-list
mailing list