Update signature style for optional arguments, part 3.

This commit is contained in:
Georg Brandl 2009-04-10 09:03:43 +00:00
parent 388faac8cb
commit c2a4f4fb67
14 changed files with 63 additions and 70 deletions

View file

@ -72,7 +72,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
The constructor for this class is:
.. function:: __init__([tabsize][, wrapcolumn][, linejunk][, charjunk])
.. method:: __init__(tabsize=8, wrapcolumn=None, linejunk=None, charjunk=IS_CHARACTER_JUNK)
Initializes instance of :class:`HtmlDiff`.
@ -88,8 +88,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
The following methods are public:
.. function:: make_file(fromlines, tolines [, fromdesc][, todesc][, context][, numlines])
.. method:: make_file(fromlines, tolines, fromdesc='', todesc='', context=False, numlines=5)
Compares *fromlines* and *tolines* (lists of strings) and returns a string which
is a complete HTML file containing a table showing line by line differences with
@ -108,8 +107,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
the next difference highlight at the top of the browser without any leading
context).
.. function:: make_table(fromlines, tolines [, fromdesc][, todesc][, context][, numlines])
.. method:: make_table(fromlines, tolines, fromdesc='', todesc='', context=False, numlines=5)
Compares *fromlines* and *tolines* (lists of strings) and returns a string which
is a complete HTML table showing line by line differences with inter-line and
@ -122,7 +120,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
contains a good example of its use.
.. function:: context_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm])
.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n')
Compare *a* and *b* (lists of strings); return a delta (a :term:`generator`
generating the delta lines) in context diff format.
@ -167,7 +165,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
See :ref:`difflib-interface` for a more detailed example.
.. function:: get_close_matches(word, possibilities[, n][, cutoff])
.. function:: get_close_matches(word, possibilities, n=3, cutoff=0.6)
Return a list of the best "good enough" matches. *word* is a sequence for which
close matches are desired (typically a string), and *possibilities* is a list of
@ -193,7 +191,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
['except']
.. function:: ndiff(a, b[, linejunk][, charjunk])
.. function:: ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK)
Compare *a* and *b* (lists of strings); return a :class:`Differ`\ -style
delta (a :term:`generator` generating the delta lines).
@ -253,7 +251,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
emu
.. function:: unified_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm])
.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n')
Compare *a* and *b* (lists of strings); return a delta (a :term:`generator`
generating the delta lines) in unified diff format.
@ -326,7 +324,7 @@ SequenceMatcher Objects
The :class:`SequenceMatcher` class has this constructor:
.. class:: SequenceMatcher([isjunk[, a[, b]]])
.. class:: SequenceMatcher(isjunk=None, a='', b='')
Optional argument *isjunk* must be ``None`` (the default) or a one-argument
function that takes a sequence element and returns true if and only if the
@ -467,7 +465,7 @@ The :class:`SequenceMatcher` class has this constructor:
insert a[6:6] () b[5:6] (f)
.. method:: get_grouped_opcodes([n])
.. method:: get_grouped_opcodes(n=3)
Return a :term:`generator` of groups with up to *n* lines of context.
@ -580,7 +578,7 @@ locality, at the occasional cost of producing a longer diff.
The :class:`Differ` class has this constructor:
.. class:: Differ([linejunk[, charjunk]])
.. class:: Differ(linejunk=None, charjunk=None)
Optional keyword parameters *linejunk* and *charjunk* are for filter functions
(or ``None``):