[Tutor] [Off topic] Is Zero Positive (was: Not Really Questions)

Carroll, Barry Barry.Carroll at psc.com
Mon Jun 5 22:11:14 CEST 2006


> -----Original Message-----
> Date: Sun, 04 Jun 2006 18:43:25 -0700
> From: Yi Qiang <yi at yiqiang.net>
> Subject: Re: [Tutor] Not Really Questions
> To: tutor at python.org
> Message-ID: <44838C3D.9010907 at yiqiang.net>
> Content-Type: text/plain; charset=ISO-8859-1
> Hash: SHA1
> Alan Gauld wrote, On 06/04/2006 04:01 PM:
> > Hi John,
> >
> > I'll pitch in although I've read most of the other answers
> > too so I'll be adding to them mostly.
> >
> >> The first one is lists... I can't for the life of me understand why
> >> a list
> >> starts at zero. In everything else in life other than programming
> >
> > Not quite. In math zero is usually the starting point, its generally
> > viewed as a positive number(although it is obviously neither
> > or negative) and proofs and definitions usually start by
> > zero - or at least defining whether zero is in or out of scope.
> That is just not true. A number is positive if and only if it is
> strictly greater than 0 by definition.  Zero is not considered
> in mathematics.  In fact, the set of positive integers, Z+, is the set
> {1,2,3,....}.
> - --
> Yi Qiang (yi at yiqiang.net)
> Web: http://www.yiqiang.net
> Tel: (206) 661-8469
> PGP: 0xB515564B

[Somewhat off topic]
Strictly speaking, Yi Qiang is correct, of course. The set Z+ (which BTW
is identical with the set of natural numbers, N), does not include 0.  0
is neither positive nor negative. However, the set of non-negative
numbers does include 0, as does the set of non-positive numbers.  The
former set, {0, 1, 2, ...}, is the one associated with lists, arrays,
etc, as it is possible to have 0 or more elements in a list, while it is
not possible to have less than 0 elements.  

[Back on topic]
Like John, I find the half-open range concept to be 'unnatural'.  When
waiting for checkout at the market, I don't think of myself as being
'zeroth' in line; I'm either 'first' or 'next' in line.  

For me, it's a matter of context.  When programming, it helps remind
myself that I'm not in the 'natural' universe where 'natural numbers'
are the rule.  I'm in the computer's mathematical universe, where
'zeroth' in line is perfectly natural.  =8^)

barry.carroll at psc.com
We who cut mere stones must always be envisioning cathedrals.

-Quarry worker's creed

More information about the Tutor mailing list