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 ysj.ray
Recipients jan.koprowski, ysj.ray
Date 2011-04-05.08:01:16
SpamBayes Score 3.0218794e-06
Marked as misclassified No
Message-id <1301990478.87.0.615994422991.issue11747@psf.upfronthosting.co.za>
In-reply-to
Content
Since if one of the two comparing files is empty, gnu diff regards the beginning line of differences as line 0 (there is not any lines), but difflib regards it as line 1(there is a line, but empty). Not sure weather is correct since the practice usage of diff output is feeding it to "patch" program which determine the different line location mostly based on context identical lines instead of the line numbers in the hunk headers, so it doesn't matter weather it's line 0 or line 1. But it is still better to keep consist with gnu diff.

In context_diff() it is correct since if there is less then 2 different lines in a hunk, only ending line number is display in hunk header.

Here is a patch which fix this.
History
Date User Action Args
2011-04-05 08:01:18ysj.raysetrecipients: + ysj.ray, jan.koprowski
2011-04-05 08:01:18ysj.raysetmessageid: <1301990478.87.0.615994422991.issue11747@psf.upfronthosting.co.za>
2011-04-05 08:01:17ysj.raylinkissue11747 messages
2011-04-05 08:01:17ysj.raycreate