Author mark.dickinson
Recipients mark.dickinson, meatballhat, techtonik, tim.peters, trentm, ysj.ray
Date 2010-05-14.09:13:54
SpamBayes Score 0.00101111
Marked as misclassified No
Message-id <>
I think it's arguable whether this is a bug or not.  There's no official specification for the unified diff format that I can find anywhere;  the GNU description at

doesn't mention this detail.  The '\ No newline at end of file' is actually unnecessary for these Python functions, since they operate on lists and produce a generator, so it would be needless complication.  And changing this might break existing Python code that manually parses the output of unified_diff or context_diff and doesn't know what to do with a leading '\' character.  (Does such Python code exist?  I don't know.)

I'd suggest adding a keyword argument to the unified_diff and context_diff  functions to enable this feature, leaving it disabled by default.
Date User Action Args
2010-05-14 09:13:57mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, techtonik, trentm, meatballhat, ysj.ray
2010-05-14 09:13:57mark.dickinsonsetmessageid: <>
2010-05-14 09:13:55mark.dickinsonlinkissue2142 messages
2010-05-14 09:13:54mark.dickinsoncreate