[Python-ideas] difflib.SequenceMatcher quick_ratio

Tal Einat taleinat at gmail.com
Mon Jun 8 17:15:29 CEST 2015


On Mon, Jun 8, 2015 at 11:44 AM, Serhiy Storchaka <storchaka at gmail.com> wrote:

> If such function will be added, I think it needs better name. E.g.
> difflib.isclose(a, b, threshold).

Indeed, this is somewhat similar in concept to the recently-added
math.isclose() function, and could use a similar signature, i.e.:
difflib.SequenceMatcher.isclose(a, b, rel_tol=None, abs_tol=None).

However, the real issue here is whether this is important enough to be
included in the stdlib.

Are there any places in the stdlib where this would be useful?

Can anyone other than the OP confirm that they would find having this
in the stdlib particularly useful?

Why should this be in the stdlib vs. a recipe?

- Tal Einat


More information about the Python-ideas mailing list