From: Berker Peksag Date: Fri, 11 Mar 2016 21:19:48 +0000 (+0200) Subject: Issue #26542: Fix markup of code example in difflib documentation X-Git-Tag: v3.6.0a1~501^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb2e02bed401e5faab7f9170350d186c59262de2;p=python Issue #26542: Fix markup of code example in difflib documentation Patch by Dmitry Shachnev. --- diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index e7e5df63cf..9a41f66079 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -501,16 +501,14 @@ The :class:`SequenceMatcher` class has this constructor: | | are equal). | +---------------+---------------------------------------------+ - For example: + For example:: >>> a = "qabxcd" >>> b = "abycdf" >>> s = SequenceMatcher(None, a, b) >>> for tag, i1, i2, j1, j2 in s.get_opcodes(): - print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format( - tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2])) - - + ... print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format( + ... tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2])) delete a[0:1] --> b[0:0] 'q' --> '' equal a[1:3] --> b[0:2] 'ab' --> 'ab' replace a[3:4] --> b[2:3] 'x' --> 'y'