summaryrefslogtreecommitdiff
path: root/Lib/difflib.py
AgeCommit message (Collapse)AuthorLines
2003-07-16Fix faulty doctests. There is no results attribute.Raymond Hettinger-5/+6
Note, these tests were not getting exercised because doctest skips over private functions.
2003-07-01Fix SF bug #763023, difflib.py: ratio() zero division not caughtNeal Norwitz-3/+8
Backport candidate
2003-06-17Fix docstringRaymond Hettinger-1/+1
2003-06-08For the context and unified diff functions:Raymond Hettinger-15/+9
* Simplified test for visible changes * Improved variable names and line spacing * Replaced dict(a=3) style with Py2.2 compatable {'a':3}
2003-06-08Added functions for creating context diffs and unified diffs.Raymond Hettinger-1/+200
Documentation update and NEWS item are forthcoming.
2002-10-30Added missing names to __all__.Raymond Hettinger-1/+1
2002-06-01SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger-1/+1
2002-04-29Mostly in SequenceMatcher.{__chain_b, find_longest_match}:Tim Peters-18/+55
This now does a dynamic analysis of which elements are so frequently repeated as to constitute noise. The primary benefit is an enormous speedup in find_longest_match, as the innermost loop can have factors of 100s less potential matches to worry about, in cases where the sequences have many duplicate elements. In effect, this zooms in on sequences of non-ubiquitous elements now. While I like what I've seen of the effects so far, I still consider this experimental. Please give it a try!
2002-04-03Add the 'bool' type and its values 'False' and 'True', as described inGuido van Rossum-7/+7
PEP 285. Everything described in the PEP is here, and there is even some documentation. I had to fix 12 unit tests; all but one of these were printing Boolean outcomes that changed from 0/1 to False/True. (The exception is test_unicode.py, which did a type(x) == type(y) style comparison. I could've fixed that with a single line using issubtype(x, type(y)), but instead chose to be explicit about those places where a bool is expected. Still to do: perhaps more documentation; change standard library modules to return False/True from predicates.
2002-04-01Remove some now-obsolete generator future statements.Tim Peters-2/+0
I left the email pkg alone; I'm not sure how Barry would like to handle that.
2001-10-04Whitespace normalization.Tim Peters-1/+1
2001-09-22Make difflib.ndiff() and difflib.Differ.compare() generators. ThisTim Peters-53/+47
restores the 2.1 ability of Tools/scripts/ndiff.py to start producing output before the entire comparison is complete.
2001-08-12SF patch #445412 extract ndiff functionality to difflib, fromTim Peters-248/+556
David Goodger.
2001-02-20Improve accuracy. In the .tex file, note the new "% BUG:" comments: anTim Peters-3/+3
extra backslash is getting displayed in the generated HTML.
2001-02-19Fix a few small typos in the docstrings.Fred Drake-5/+5
get_close_matches(): Do not use %-interpolation for strings when concatenation is more efficient.
2001-02-10Moved SequenceMatcher from ndiff into new std library module difflib.py.Tim Peters-0/+781
Guido told me to do this <wink>. Greatly expanded docstrings, and fleshed out with examples. New std test. Added new get_close_matches() function for ESR. Needs docs, but LaTeXification of the module docstring is all it needs. \CVS: ----------------------------------------------------------------------