This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Lewis Ball
Recipients Lewis Ball, docs@python
Date 2020-05-06.22:21:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588803675.88.0.74490317192.issue40539@roundup.psfhosted.org>
In-reply-to
Content
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))
History
Date User Action Args
2020-05-06 22:21:15Lewis Ballsetrecipients: + Lewis Ball, docs@python
2020-05-06 22:21:15Lewis Ballsetmessageid: <1588803675.88.0.74490317192.issue40539@roundup.psfhosted.org>
2020-05-06 22:21:15Lewis Balllinkissue40539 messages
2020-05-06 22:21:15Lewis Ballcreate