This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Brice.Videau
Recipients Brice.Videau
Date 2011-03-22.10:09:29
SpamBayes Score 9.979506e-06
Marked as misclassified No
Message-id <1300788570.13.0.524020554804.issue11632@psf.upfronthosting.co.za>
In-reply-to
Content
unified_diff seems to lose the context when comparing the 2 files contained in the attached archive using this script :

import difflib
b1 = open("out1.short","r").read().splitlines(True)
b2 = open("out2.short","r").read().splitlines(True)
compare = difflib.unified_diff(b1,b2)
for line in compare:
    print line,

a big chunk of lines is considered as removed, just to be added next (around line 16).

Comparing out2.short against out1.short does not produce this behavior :
compare = difflib.unified_diff(b2,b1)
is "correct".

Other diff tools such as diff or vimdiff do not exhibit this problem.
History
Date User Action Args
2011-03-22 10:09:30Brice.Videausetrecipients: + Brice.Videau
2011-03-22 10:09:30Brice.Videausetmessageid: <1300788570.13.0.524020554804.issue11632@psf.upfronthosting.co.za>
2011-03-22 10:09:29Brice.Videaulinkissue11632 messages
2011-03-22 10:09:29Brice.Videaucreate