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

49 lines
1.2 KiB
Plaintext

From: tim_one at email.msn.com (Tim Peters)
Date: Thu, 29 Apr 1999 20:21:25 -0400
Subject: string.atoi('-')
In-Reply-To: <372894B5.78F68430@embl-heidelberg.de>
Message-ID: <000101be929f$6258e180$5fa02299@tim>
X-UID: 1560
[Jens Linge]
> 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
> >>>
1.5.2 on Windows:
D:\Python>python
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import string
>>> string.atoi('-')
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for atoi(): -
>>>
> Does it depend on the compilation?
I'd try recompiling Python with optimization disabled and see whether that
it makes it go away. If so, you're looking at a compiler bug.
> WHAT IS THE RULE?
Do unto others as you would have them do unto you? Something like that.
but-so-far-as-ints-go-"-"-ain't-one-ly y'rs - tim