On Thu, 16 Nov 2006 16:40:49 -0800, John Henry wrote:

> I am just wondering what's with get_close_matches() in difflib.  What's
> the magic?   How fuzzy do I need to get in order to get a match?


Why don't you try it and see?

>>> from difflib import get_close_matches
>>> get_close_matches("appel", ["ape", "apple", "peach", "puppy"])
['apple', 'ape']
>>> import keyword as _keyword
>>> get_close_matches("wheel", _keyword.kwlist)
['while']
>>> get_close_matches("apple", _keyword.kwlist)
[]
>>> get_close_matches("accept", _keyword.kwlist)
['except']


Those example, by the way, come from here:

>>> help(get_close_matches)




-- 
Steven

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to