diff options
| author | Georg Brandl <georg@python.org> | 2007-10-21 10:52:38 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2007-10-21 10:52:38 (GMT) |
| commit | cf3fb259329eedfa9d2c802b2ea5ced287c21e78 (patch) | |
| tree | bd09350c4ac4d66064526573c19ebbcd27f77279 /Doc/library/difflib.rst | |
| parent | bb75e4e5d243a32cf31b91543b06b829c63e2c70 (diff) | |
| download | cpython-cf3fb259329eedfa9d2c802b2ea5ced287c21e78.zip cpython-cf3fb259329eedfa9d2c802b2ea5ced287c21e78.tar.gz cpython-cf3fb259329eedfa9d2c802b2ea5ced287c21e78.tar.bz2 | |
Add :term: for generators.
Diffstat (limited to 'Doc/library/difflib.rst')
| -rw-r--r-- | Doc/library/difflib.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 60367a4..4da3be9 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -126,8 +126,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. .. function:: context_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm]) - Compare *a* and *b* (lists of strings); return a delta (a generator generating - the delta lines) in context diff format. + Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` + generating the delta lines) in context diff format. Context diffs are a compact way of showing just the lines that have changed plus a few lines of context. The changes are shown in a before/after style. The @@ -181,8 +181,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. .. function:: ndiff(a, b[, linejunk][, charjunk]) - Compare *a* and *b* (lists of strings); return a :class:`Differ`\ -style delta - (a generator generating the delta lines). + Compare *a* and *b* (lists of strings); return a :class:`Differ`\ -style + delta (a :term:`generator` generating the delta lines). Optional keyword parameters *linejunk* and *charjunk* are for filter functions (or ``None``): @@ -242,8 +242,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. .. function:: unified_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm]) - Compare *a* and *b* (lists of strings); return a delta (a generator generating - the delta lines) in unified diff format. + Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` + generating the delta lines) in unified diff format. Unified diffs are a compact way of showing just the lines that have changed plus a few lines of context. The changes are shown in a inline style (instead of @@ -442,7 +442,7 @@ use :meth:`set_seq2` to set the commonly used sequence once and call .. method:: SequenceMatcher.get_grouped_opcodes([n]) - Return a generator of groups with up to *n* lines of context. + Return a :term:`generator` of groups with up to *n* lines of context. Starting with the groups returned by :meth:`get_opcodes`, this method splits out smaller change clusters and eliminates intervening ranges which have no changes. |
