[Patches] string.atol() [Unicode Patch Set 2000-04-03]
Wed, 05 Apr 2000 00:23:18 +0200
"M.-A. Lemburg" wrote:
> Guido van Rossum wrote:
> > I've also found another problem (which may have existed before???):
> > in test.test_string.py, string.atol(' 1x ',) is supposed to raise
> > ValueError, but actually returns 1L.
> > I'll hold off on checkin in these changes...
> Ouch, I only checked test_builtin, not test_string when I
> added the new Unicode support to int() et al.
> The different semantics in string.atol() are due to the change
> I did to the string.py ato?() APIs. I asked on python-dev about
> this and noone objected, so I simply tried the change. While
> doing so I found a rather strange semantic difference in the
> string->long conversion:
> Should I leave the string.py patch out of the set until
> there has been some more discussion on python-dev ?
BTW, to get the regr. test to pass and string.atol() work
exactly like before, you only have to change the default
base to the magic number -909.
Python Pages: http://www.lemburg.com/python/