difflib: turn some tests into examples, fix documentation

This commit is contained in:
Patrick Mezard
2013-11-23 21:08:37 +01:00
parent 4d91f93589
commit 6fb7d10580
2 changed files with 34 additions and 45 deletions

View File

@@ -363,10 +363,11 @@ func (m *SequenceMatcher) GetMatchingBlocks() []Match {
// The tags are characters, with these meanings:
//
// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2]
// 'd' (delete): a[i1:i2] should be deleted.
// Note that j1==j2 in this case.
// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1].
// Note that i1==i2 in this case.
//
// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case.
//
// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case.
//
// 'e' (equal): a[i1:i2] == b[j1:j2]
func (m *SequenceMatcher) GetOpCodes() []OpCode {
if m.opCodes != nil {