Skip to content

Commit eb2e02b

Browse files
committed
Issue python#26542: Fix markup of code example in difflib documentation
Patch by Dmitry Shachnev.
1 parent 04d4229 commit eb2e02b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Doc/library/difflib.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,16 +501,14 @@ The :class:`SequenceMatcher` class has this constructor:
501501
| | are equal). |
502502
+---------------+---------------------------------------------+
503503

504-
For example:
504+
For example::
505505

506506
>>> a = "qabxcd"
507507
>>> b = "abycdf"
508508
>>> s = SequenceMatcher(None, a, b)
509509
>>> for tag, i1, i2, j1, j2 in s.get_opcodes():
510-
print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(
511-
tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))
512-
513-
510+
... print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(
511+
... tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))
514512
delete a[0:1] --> b[0:0] 'q' --> ''
515513
equal a[1:3] --> b[0:2] 'ab' --> 'ab'
516514
replace a[3:4] --> b[2:3] 'x' --> 'y'

0 commit comments

Comments
 (0)