Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Doc/library/difflib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
complicated way on how many elements the sequences have in common; best case
time is linear.

.. impl-detail::

On CPython, the :class:`SequenceMatcher` class is implemented in C for
speed. The pure-Python reference implementation remains available as
:mod:`!_pydifflib` for alternative Python implementations. Output is
bit-identical between the two implementations, including tie-breaks;
typical workloads run 5--25x faster than the pure-Python version, with
character/byte sequences seeing the largest gains.

**Automatic junk heuristic:** :class:`SequenceMatcher` supports a heuristic that
automatically treats certain sequence items as junk. The heuristic counts how many
times each individual item appears in the sequence. If an item's duplicates (after
Expand Down
6 changes: 6 additions & 0 deletions Include/internal/pycore_global_objects_fini_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,14 @@ struct _Py_global_strings {
STRUCT_FOR_ID(adobe)
STRUCT_FOR_ID(after_in_child)
STRUCT_FOR_ID(after_in_parent)
STRUCT_FOR_ID(ahi)
STRUCT_FOR_ID(alias)
STRUCT_FOR_ID(align)
STRUCT_FOR_ID(all)
STRUCT_FOR_ID(all_interpreters)
STRUCT_FOR_ID(all_threads)
STRUCT_FOR_ID(allow_code)
STRUCT_FOR_ID(alo)
STRUCT_FOR_ID(alphabet)
STRUCT_FOR_ID(any)
STRUCT_FOR_ID(append)
Expand All @@ -322,13 +324,16 @@ struct _Py_global_strings {
STRUCT_FOR_ID(athrow)
STRUCT_FOR_ID(attribute)
STRUCT_FOR_ID(autocommit)
STRUCT_FOR_ID(autojunk)
STRUCT_FOR_ID(backtick)
STRUCT_FOR_ID(base)
STRUCT_FOR_ID(before)
STRUCT_FOR_ID(bhi)
STRUCT_FOR_ID(big)
STRUCT_FOR_ID(binary_form)
STRUCT_FOR_ID(bit_offset)
STRUCT_FOR_ID(bit_size)
STRUCT_FOR_ID(blo)
STRUCT_FOR_ID(block)
STRUCT_FOR_ID(blocking)
STRUCT_FOR_ID(bound)
Expand Down Expand Up @@ -573,6 +578,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(is_struct)
STRUCT_FOR_ID(isatty)
STRUCT_FOR_ID(isinstance)
STRUCT_FOR_ID(isjunk)
STRUCT_FOR_ID(isoformat)
STRUCT_FOR_ID(isolation_level)
STRUCT_FOR_ID(istext)
Expand Down
6 changes: 6 additions & 0 deletions Include/internal/pycore_runtime_init_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions Include/internal/pycore_unicodeobject_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading