36 Commits

Author SHA1 Message Date
Raymond Hettinger
1622d82c08 SF #1637850: make_table in difflib did not work with unicode 2007-03-08 21:30:55 +00:00
Andrew M. Kuchling
3b015c46a5 [Bug #1622533] Make docstrings raw strings because they contain control characters (\0, \1) 2007-01-05 14:24:36 +00:00
Tim Peters
61bdd39b02 Repaired typo in new comment. 2006-06-14 04:13:00 +00:00
Tim Peters
43898b4f64 SequenceMatcher.get_matching_blocks(): This now guarantees that
adjacent triples in the result list describe non-adjacent matching
blocks.  That's _nice_ to have, and Guido said he wanted it.

Not a bugfix candidate:  Guido or not ;-), this changes visible
endcase semantics (note that some tests had to change), and
nothing about this was documented before.  Since it was working
as designed, and behavior was consistent with the docs, it wasn't
"a bug".
2006-06-14 04:09:25 +00:00
Tim Peters
7ca6677218 get_matching_blocks(): rewrote code & comments so they match; added
more comments about why it's this way at all; and removed what looked
like needless expense (sorting (i, j, k) triples directly should give
exactly the same order as sorting (i, (i, j, k)) pairs).
2006-06-13 03:30:07 +00:00
Georg Brandl
b2afe855e5 Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
2006-06-09 20:43:48 +00:00
Gustavo Niemeyer
548148810b Patch #1413711: Certain patterns of differences were making difflib
touch the recursion limit. The applied patch inlines the recursive
__helper method in a non-recursive way.
2006-01-31 18:34:13 +00:00
Georg Brandl
7eb4b7d177 Fix all wrong instances of "it's". 2005-07-22 21:49:32 +00:00
Tim Peters
0ca0c64409 SF bug 1054821: difflib HtmlDiff() extra space on inserted 1 character lines
Simple correction from the code's author (Dan Gass).
2004-11-12 16:12:15 +00:00
Andrew M. Kuchling
55be9eab38 Typo fix: 'comparisions' is not a word 2004-09-10 12:59:54 +00:00
Tim Peters
48bd7f3a71 Whitespace normalization. test_difflib passes again. 2004-08-29 22:38:38 +00:00
Tim Peters
afb5f94217 Reverting whitespace normalization. test_difflib fails with it -- the
test depends on invisible trailing whitespace in .py files.  The author will
have to repair that.
2004-08-29 19:33:36 +00:00
Tim Peters
45e77c55ff Whitespace normalization. 2004-08-29 18:47:31 +00:00
Martin v. Löwis
e064b41f5a Patch #914575: difflib side by side diff support, diff.py s/b/s HTML option. 2004-08-29 16:34:40 +00:00
Tim Peters
bcc95cb7cb Repair typo in docstring. 2004-07-31 00:19:43 +00:00
Brett Cannon
d2c5b4b549 SequenceMatcher(None, [], []).get_grouped_opcodes() now returns a generator
that behaves as if both lists has an empty string in each of them.

Closes bug #979794 (and duplicate bug #980117).
2004-07-10 23:54:07 +00:00
Raymond Hettinger
aefde435ef Reverse argument order for nsmallest() and nlargest().
Reads better when the iterable is a generator expression.
2004-06-15 23:53:35 +00:00
Raymond Hettinger
bb6b7346ce Apply heapq.nlargest() to find best matches. 2004-06-13 09:57:33 +00:00
Walter Dörwald
70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Raymond Hettinger
6b59f5f3fd Let library modules use the new keyword arguments for list.sort(). 2003-10-16 05:53:16 +00:00
Raymond Hettinger
83325e9087 Fix faulty doctests. There is no results attribute.
Note, these tests were not getting exercised because
doctest skips over private functions.
2003-07-16 04:32:32 +00:00
Neal Norwitz
e7dfe21bed Fix SF bug #763023, difflib.py: ratio() zero division not caught
Backport candidate
2003-07-01 14:59:46 +00:00
Raymond Hettinger
0887c732e7 Fix docstring 2003-06-17 16:53:25 +00:00
Raymond Hettinger
7f2d302a16 For the context and unified diff functions:
* Simplified test for visible changes
* Improved variable names and line spacing
* Replaced dict(a=3) style with Py2.2 compatable {'a':3}
2003-06-08 19:38:42 +00:00
Raymond Hettinger
f0b1a1fca9 Added functions for creating context diffs and unified diffs.
Documentation update and NEWS item are forthcoming.
2003-06-08 11:07:08 +00:00