Rémi Lapeyre <remi.lape...@henki.fr> added the comment:

I fell like it's a bit weird to have a new function just for ignoring case, 
will a new function be required for every possible normalization like removing 
accents. One possible make the API handle those use cases would be to have a 
keyword-argument for this:


>>> difflib.get_close_matches('apple', ['APPLE'], normalization=str.lower)
['APPLE']

Then it could work with other normalization too without requiring a new 
function every time:

>>> difflib.get_close_matches('Remi', ['Rémi'], normalization=remove_a ccents)
['Rémi']

----------
components: +Library (Lib)
nosy: +remi.lapeyre
versions: +Python 3.10 -Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39891>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to