From: jwbaxter at olympus.net (John W. Baxter)
Date: Thu, 29 Apr 1999 22:21:19 -0700
Subject: string.atoi('-')
References: <372894B5.78F68430@embl-heidelberg.de> <372904D7.1A9FC1AB@bioreason.com>
Message-ID: <jwbaxter-2904992221190001@otter.olympus.net>
X-UID: 1301                                                  

In article <372904D7.1A9FC1AB at bioreason.com>, Andrew Dalke
<dalke at bioreason.com> wrote:

> (cc'ed to Jens Linge <linge at embl-heidelberg.de>, the author of)
> > With python 1.51 running on a SGI:
> > >>> string.atoi('-')
> > Traceback (innermost last):
> >   File "<stdin>", line 1, in ?
> > ValueError: invalid literal for atoi(): -
> > >>> 
> > 
> > But with python 1.52 running on a SGI:
> > >>> string.atoi('-')
> > 0
> > >>> 
> > 
> > Does it depend on the compilation?
> > Does anyone have the same problem?
> > 
> > WHAT IS THE RULE?

The rule is:  for the sake of sanity, do not present atoi() with the string '-'.

   --John

-- 
If nothing is pressing, putter about with this or that.
    (Fortune cookie)
John W. Baxter   Port Ludlow, WA USA  jwb at olympus.net




