[Python-checkins] cpython (3.5): Issue #26542: Fix markup of code example in difflib documentation
berker.peksag
python-checkins at python.org
Fri Mar 11 16:19:35 EST 2016
https://hg.python.org/cpython/rev/ffd0603f5251
changeset: 100491:ffd0603f5251
branch: 3.5
parent: 100489:8ac695499fa3
user: Berker Peksag <berker.peksag at gmail.com>
date: Fri Mar 11 23:19:48 2016 +0200
summary:
Issue #26542: Fix markup of code example in difflib documentation
Patch by Dmitry Shachnev.
files:
Doc/library/difflib.rst | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -501,16 +501,14 @@
| | 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'
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list