New submission from Lewis Ball <lrjb...@gmail.com>:
Currently the docs for `difflib.SequenceMatcher.quick_ratio()` just says 'Return an upper bound on ratio() relatively quickly', which doesn't give much of an idea about how that upper bound is calculated. `real_quick_ratio` has similarly brief documentation. I'll raise a PR shortly to add a more verbose description to each of these ratios, so that it is clear when each should be used. My current suggestions would be: quick_ratio Return an upper bound on ratio() relatively quickly. This is the highest possible ratio() given these letters, regardless of their order. real_quick_ratio Return an upper bound on ratio() very quickly. This is the highest possible ratio() given the lengths of a and b, regardless of their letters. i.e. 2*(min(len(a), len(b))/(len(a) + len(b)) ---------- assignee: docs@python components: Documentation messages: 368305 nosy: Lewis Ball, docs@python priority: normal severity: normal status: open title: Docs - difflib.SequenceMatcher quick_ratio and real_quick_ratio improved docs type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40539> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com