[ python-Bugs-1488943 ] difflib.Differ() doesn't always add hints for tab characters

SourceForge.net noreply at sourceforge.net
Mon May 15 18:27:38 CEST 2006


Bugs item #1488943, was opened at 2006-05-16 00:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1488943&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Henry (henryl)
Assigned to: Nobody/Anonymous (nobody)
Summary: difflib.Differ() doesn't always add hints for tab characters

Initial Comment:
The difflib.Differ() object doesn't always add a hint
for added tab characters.

eg:
import difflib
differ = difflib.Differ()
for change in differ.compare(["\tI am a buggy"],
["\t\tI am a bug"]):
	print repr(change)

Should return

'- \tI am a buggy'
'? \t          --\n'
'+ \t\tI am a bug'
'? +\n'

but actually returns (no hint for the added tab)

'- \tI am a buggy'
'? \t          --\n'
'+ \t\tI am a bug'

sys.version reports
2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit
(Intel)]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1488943&group_id=5470


More information about the Python-bugs-list mailing list