string.py

Aahz Maruch aahz at netcom.com
Wed Feb 16 16:33:37 EST 2000


In article <m3snysor7o.fsf at atrus.jesus.cam.ac.uk>,
Michael Hudson  <mwh21 at cam.ac.uk> wrote:
>
>While we're at it, I've just noticed that some things aren't string
>methods that you might expect to be.
>
>The heuristic:
>
>>>> for i in dir(string):
>...  if i in dir(""): continue
>...  if type(getattr(string,i)) not in [types.FunctionType]: continue
>...  print i
>
>produces:
>
>atof
>atoi
>atol
>
>atof/atoi/atol I can understand - use float/int/long instead.

Um, color me stupid, but how does one do 'ff'.atoi(16) using 'ff'.int()?
--
                      --- 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

Have you coined a word today?



More information about the Python-list mailing list