Added length=0 handling to soundex to return the everything.

This commit is contained in:
Jeremy Fincher 2003-04-05 11:29:29 +00:00
parent b8f2bbb1bb
commit e4715d4d3f

View File

@ -191,6 +191,6 @@ def soundex(s, length=4):
L.append(c)
L = [c for c in L if c != '0'] + ['0', '0', '0']
s = ''.join(L)
return length and s[:length] or s
return length and s[:length] or s.rstrip('0')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: