wasm-demo/demo/ermis-f/python_m/cur/0070

81 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

From: dalke at bioreason.com (Andrew Dalke)
Date: Thu, 29 Apr 1999 19:18:15 -0600
Subject: string.atoi('-')
References: <372894B5.78F68430@embl-heidelberg.de>
Message-ID: <372904D7.1A9FC1AB@bioreason.com>
Content-Length: 1930
X-UID: 70
(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?
My 1.5.1 installation on IRIX 6.2 and 6.5 (compiled under 6.2
with the 7.1 compiler using -o32) says:
val> python
Python 1.5.1 (#21, Nov 23 1998, 15:04:47) [C] on irix6
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import string
>>> string.atoi('-')
0
so it isn't a 1.5.1 to 1.5.2 difference or a difference in
the -o32 libraries for the OS version. I suspect either the
compiler or the -n32 libs.
I compiled 1.5.2c1 with the newer compiler using -n32. The
result is the error you got:
max> ./python
Python 1.5.2c1 (#5, Apr 29 1999, 19:04:33) [C] on irix646
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import string
>>> string.atoi('-')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for atoi(): -
I recompiled 152c1 for SGI_ABI = -o32 on the same machine and
compiler.
max> ./python
Python 1.5.2c1 (#6, Apr 29 1999, 19:12:12) [C] on irix646-o32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import string
>>> string.atoi('-')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for atoi(): -
This suggests that the compiler changed a bit (fixed a bug it
seems) and that you are compiling 1.5.2 on the 7.1 compiler while
you compiled 1.5.1 on the 7.2 compiler.
Can you try other combinations of machines and compilers? Or
perhaps change the ABI to -n32 (or -o32) to get a different
set of library routines?
Andrew
dalke at bioreason.com