diff options
author | Terry Reedy <tjreedy@udel.edu> | 2010-12-03 18:57:42 (GMT) |
---|---|---|
committer | Terry Reedy <tjreedy@udel.edu> | 2010-12-03 18:57:42 (GMT) |
commit | 74a7c67db15d617a09d71d5c368ddded72f0362d (patch) | |
tree | adafd2bef5e0c23910ecdb3804d4e488892ba973 /Doc | |
parent | f3b68b3f981b8baa81e3e838ab921d2e4362ae33 (diff) | |
download | cpython-74a7c67db15d617a09d71d5c368ddded72f0362d.zip cpython-74a7c67db15d617a09d71d5c368ddded72f0362d.tar.gz cpython-74a7c67db15d617a09d71d5c368ddded72f0362d.tar.bz2 |
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/difflib.rst | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 89d69ac..bfe5e58 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -358,6 +358,16 @@ The :class:`SequenceMatcher` class has this constructor: .. versionadded:: 3.2 The *autojunk* parameter. + SequenceMatcher objects get three data attributes: *bjunk* is the + set of elements of b for which *isjunk* is True; *bpopular* is the set of non- + junk elements considered popular by the heuristic (if it is not disabled); + *b2j* is a dict mapping the remaining elements of b to a list of positions where + they occur. All three are reset whenever *b* is reset with :meth:`set_seqs` + or :meth:`set_seq2`. + +.. versionadded:: 3.2 + The *bjunk* and *bpopular* attributes. + :class:`SequenceMatcher` objects have the following methods: @@ -538,7 +548,7 @@ different results due to differing levels of approximation, although SequenceMatcher Examples ------------------------ -This example compares two strings, considering blanks to be "junk:" +This example compares two strings, considering blanks to be "junk": >>> s = SequenceMatcher(lambda x: x == " ", ... "private Thread currentThread;", |