[issue11747] unified_diff function product incorrect range information

Terry J. Reedy report at bugs.python.org
Sat Apr 9 22:36:02 CEST 2011


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Thanks, Raymond. That file says (in the -u section) "If a range is empty, its beginning line number shall be the number of the line just before the range, or 0 if the empty range starts the file." The last clause says to me that gnu diff is right and that the 1,0 range of difflib.unified_diff is a bug.

I think we should add this link to the difflib doc (I am still thinking about place and wording).

News entry might be
Issue # 11747: Correct difflib.unified_diff empty file range from 1,0 to 0,0 in conformance with Single Unix Specification for diff output formats. Patch by ysj.ray.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11747>
_______________________________________


More information about the Python-bugs-list mailing list