[docs] Inaccurate description of HtmlDiff.make_table, Python 3.1.5
andrew.svetlov at gmail.com
Fri Nov 2 21:46:23 CET 2012
Perhaps we have some misunderstanding.
>>> from difflib import *
>>> s1 = ['bacon\n', 'eggs\n', 'ham\n', 'guido\n']
>>> s2 = ['python\n', 'eggy\n', 'hamster\n', 'guido\n']
>>> d.make_table(s1, s2)
... LONG ENOUGH OUTPUT
when I've opened that output in browser the differences was definitely
I've tried it on 3.2, 3.1 is open for security bugs only for now BTW.
Please inform me how to reproduce your problem.
Also please keep in mind: 3.1 in security-only stage, if your issue has
been fixed in 3.2 we'll do nothing to backport fix into 3.1
On Fri, Nov 2, 2012 at 8:47 PM, rail shafigulin
<rail.shafigulin at gmail.com>wrote:
> I can't see any highlighting. I'm attaching diff.html which I generated
> using the script provided here,
> http://docs.python.org/release/3.1.5/library/difflib.html#a-command-line-interface-to-difflib .
> In the script I changed make_file to make_table to demonstrate the effect.
> I'm also attaching two text files I used for diff generation.
> I'm running Python 3.1.5 on a Windows XP Pro Version 2002, SP 3.
> On Thu, Nov 1, 2012 at 6:34 AM, Andrew Svetlov <andrew.svetlov at gmail.com>wrote:
>> It works, at least from my understanding of «highlighting».
>> On Tue, Oct 30, 2012 at 9:16 PM, rail shafigulin <
>> rail.shafigulin at gmail.com> wrote:
>>> The description of HtmlDiff.make_table is inaccurate,
>>> http://docs.python.org/release/3.1.5/library/difflib.html#difflib.HtmlDiff.make_table It
>>> says the following
>>> "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 intra-line changes highlighted."
>>> However non of the rows in the tables are highlighted.
>>> There are two possible fixes for this.
>>> 1. The documentation is incorrect in describing what should happen when
>>> this method is called. Instead of what is says right now it should say that
>>> the table is generated without showing any differences.
>>> 2. The code does not reflect the documentation, i.e. make_table should
>>> generate the html string correctly.
>>> I'm running Python 3.1.5 on a Windows Xp Pro Version 2002, SP 3.
>>> docs mailing list
>>> docs at python.org
>> Andrew Svetlov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs