diff options
author | Georg Brandl <georg@python.org> | 2007-11-02 20:06:17 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-11-02 20:06:17 (GMT) |
commit | 7c3e79f67f6191fb500144db1d484d8bb8619f5a (patch) | |
tree | 36ae7c99ee5a7d66b8145f9005237e5897aae2d3 /Doc/library/difflib.rst | |
parent | 03fd077482fd5d88a40a8f0d04e0566b9738098a (diff) | |
download | cpython-7c3e79f67f6191fb500144db1d484d8bb8619f5a.zip cpython-7c3e79f67f6191fb500144db1d484d8bb8619f5a.tar.gz cpython-7c3e79f67f6191fb500144db1d484d8bb8619f5a.tar.bz2 |
Make "hashable" a glossary entry and clarify docs on __cmp__, __eq__ and __hash__.
I hope the concept of hashability is better understandable now.
Thanks to Tim Hatch for pointing out the flaws here.
Diffstat (limited to 'Doc/library/difflib.rst')
-rw-r--r-- | Doc/library/difflib.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 4da3be9..baea5d4 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -20,7 +20,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. .. class:: SequenceMatcher This is a flexible class for comparing pairs of sequences of any type, so long - as the sequence elements are hashable. The basic algorithm predates, and is a + as the sequence elements are :term:`hashable`. The basic algorithm predates, and is a little fancier than, an algorithm published in the late 1980's by Ratcliff and Obershelp under the hyperbolic name "gestalt pattern matching." The idea is to find the longest contiguous matching subsequence that contains no "junk" @@ -313,7 +313,7 @@ The :class:`SequenceMatcher` class has this constructor: on blanks or hard tabs. The optional arguments *a* and *b* are sequences to be compared; both default to - empty strings. The elements of both sequences must be hashable. + empty strings. The elements of both sequences must be :term:`hashable`. :class:`SequenceMatcher` objects have the following methods: |