soundex (revisited)

Emile van Sebille emile at
Sun Dec 24 19:54:54 CET 2000

"Daniel Klein" <DanielK at> wrote in message
news:Var16.263$LU6.109277 at
> After seeing the post from several days ago on soundex, I
gave it whirl to
> see if I could come up with something different (and
possibly better),
> following the rules laid down by Knuth:
> One question: how is it that this understands the
'upper()' function without
> explicitly importing the 'string' module?
> Dan:

In 2.0, strings now have methods:

Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license" for more
IDLE 0.6 -- press F1 for help
>>> print dir("")
['capitalize', 'center', 'count', 'encode', 'endswith',
'expandtabs', 'find', 'index', 'isalnum', 'isalpha',
'isdigit', 'islower', 'isspace', 'istitle', 'isupper',
'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind',
'rindex', 'rjust', 'rstrip', 'split', 'splitlines',
'startswith', 'strip', 'swapcase', 'title', 'translate',


Emile van Sebille
emile at

More information about the Python-list mailing list