string.py

Aahz Maruch aahz at netcom.com
Wed Feb 16 20:24:53 EST 2000


In article <14507.17447.857827.44321 at anthem.cnri.reston.va.us>,
Barry A. Warsaw <bwarsaw at cnri.reston.va.us> wrote:
>
>>>>>> "A" == Alex  <alex at somewhere.round.here> writes:
>
>    >> how does one do 'ff'.atoi(16) using 'ff'.int()?
>
>    A> Aahz, my impression was that he was talking about functions
>    A> available in the string module, not really methods of a string
>    A> object.
>
>Actually, he's talking about the builtin int(), float(), and long()
>functions.  We decided that those subsumed all the functionality of
>string.atoi(), etc. so it didn't add anything to make string methods
>of atoi, etc.

Well, int() definitely does *NOT* subsume all functionality of
string.atoi() (note the "16" radix above; string.atoi('ff',16) in
1.5.2), so I think that atoi() needs to be a string method.  If you've
got atoi(), might as well add the others for consistency.

I'm assuming, of course, that the revised 1.5.2 documents are correct
and that int() still does not take a radix.
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Our society has become so fractured that the pendulum is swinging
several different directions at the same time



More information about the Python-list mailing list