[issue21344] save scores or ratios in difflib get_close_matches

Russell Ballestrini report at bugs.python.org
Thu Apr 24 16:42:12 CEST 2014


New submission from Russell Ballestrini:

The current implementation of difflib's get_close_matches() function computes computationally complex scores (ratios) but then tosses them out without giving the end-user the chance to have at them.

This patch adds an optional "scores" boolean argument that may be passed to alter the return output from a list of words, to a list of (score, word) tuples.

----------
components: Library (Lib)
files: difflib.py
messages: 217123
nosy: russellballestrini
priority: normal
severity: normal
status: open
title: save scores or ratios in difflib get_close_matches
type: enhancement
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file35022/difflib.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21344>
_______________________________________


More information about the Python-bugs-list mailing list