Skip to content
pythonwrench Development-0.6.1 documentation
pythonwrench.difflib module
Initializing search
    pythonwrench
    pythonwrench
    • pythonwrench
      • pythonwrench package
        • Subpackages
        • Submodules
          • pythonwrench.abc module
          • pythonwrench.argparse module
          • pythonwrench.cast module
          • pythonwrench.checksum module
          • pythonwrench.concurrent module
          • pythonwrench.csv module
          • pythonwrench.dataclasses module
          • pythonwrench.datetime module
          • pythonwrench.difflib module
            • F pythonwrench.difflib.find_closest_in_list
            • F pythonwrench.difflib.sequence_matcher_ratio
          • pythonwrench.disk_cache module
          • pythonwrench.enum module
          • pythonwrench.functools module
          • pythonwrench.hashlib module
          • pythonwrench.importlib module
          • pythonwrench.inspect module
          • pythonwrench.json module
          • pythonwrench.jsonl module
          • pythonwrench.logging module
          • pythonwrench.math module
          • pythonwrench.os module
          • pythonwrench.pickle module
          • pythonwrench.random module
          • pythonwrench.re module
          • pythonwrench.semver module
          • pythonwrench.time module
          • pythonwrench.warnings module
    • F pythonwrench.difflib.find_closest_in_list
    • F pythonwrench.difflib.sequence_matcher_ratio

    pythonwrench.difflib module¶

    pythonwrench.difflib.find_closest_in_list(x: str, lst: Iterable[str], sim_fn: Callable[[str, str], float] | None = None, higher_is_closer: bool = True) → str | None[source]¶

    Find closest element in a list based on matches ratio.

    pythonwrench.difflib.sequence_matcher_ratio(a: str, b: str) → float[source]¶

    Compute distance ratio of two strings.

    © Copyright Étienne Labbé (Labbeti).
    Created using Sphinx 8.2.3. and Sphinx-Immaterial