[issue39891] [difflib] Improve get_close_matches() to better match when casing of words are different
Tim Peters
report at bugs.python.org
Sat Mar 7 21:51:17 EST 2020
Tim Peters <tim at python.org> added the comment:
If you pursue this, please introduce a new function for it. You immediately have an idea about how to change the current function precisely because it _doesn't_ try to guess what you really wanted. That lack of magic is valuable - you're not actually confused by what it does, because it doesn't do anything to the strings you give it ;-) By the same token, if you have a crisp idea of how it should treat strings instead, it's straightforward to write a wrapper that does so. The existing function won't fight you by trying to impose its own ideas.
Guessing what people really wanted tends to become a bottomless pit. For example, do you know all the rules for what "case" even means in a Unicode world? What about diacritical marks? And so on. I don't.
Not saying it shouldn't be pursued. Am saying it may be hard to reach consensus on what's "really" wanted. By some people, some of the time. Never - alas - by all people all the time.
----------
nosy: +tim.peters
stage: -> needs patch
type: -> enhancement
versions: +Python 3.9 -Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39891>
_______________________________________
More information about the Python-bugs-list
mailing list