brian.gallagher added the comment:
Just giving this a bump, in case it has been forgotten about.
I've posted a patch at https://github.com/python/cpython/pull/18983.
It adds a new parameter "ignorecase" to get_close_matches() that, if set to
True, will result in the SequenceMatche
brian.gallagher added the comment:
I agree that there is an appeal to leaving any normalization to the application
and that trying guess what people want is a tough hole -- I hadn't even
considered what casing would mean in a general sense for Unicode.
I'm not entirely convinced
New submission from brian.gallagher :
Currently difflib's get_close_matches() doesn't match similar words that differ
in their casing very well.
Example:
user@host:~$ python3
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", &
brian.gallagher added the comment:
That makes sense. For what it's worth, the use-case that inspired this was for
commands with a lot of optional arguments in a company where a large amount of
contributors (who may not be aware of an effort to order the arguments in the
source code) were
New submission from brian.gallagher :
1 import argparse
2
3 parser = argparse.ArgumentParser(description='Test