It would be a helpful feature to incorporate logic into the difflib module to optionally identify and ignore identical, but relocated lines when doing a diff. This would be used when the order of lines in a document is not critical, but rather just the overall content. The Notepad++ Compare plug-in has this feature for reference. I would be willing to help submit a patch for this change. The only drawbacks I see using this function is it will either have to increase processing time or increase memory usage.
I have put together 5 basic tests to implement moved lines in difflib. All diffs should be compared against the 'diffmove_base.txt' file. Below is a short description of each test. 1) Basic reordering of lines 2) Reordering of lines with new lines added 3) Reordering of lines with one line removed 4) Reordering of lines with one character omitted from a line and character added to another line 5) Combination of all previous tests