[issue25871] textwrap.dedent doesn't find common substring when spaces and tabs are mixed

2015-12-15 Thread Chris Tozer

New submission from Chris Tozer:

Two lines, one has three spaces, one has two spaces then a tab - dedent doesn't 
take the two spaces away...

Python 2.7.5 (default, Nov 20 2015, 02:00:19) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from textwrap import dedent
>>> dedent("   some\n  \tthing")
'   some\n  \tthing'
>>> dedent("   some\n   \tthing")
'some\n\tthing'

Looks very similar to issue 21827, but having upgraded to a newer build of 2.7 
(Nov 2015, as above), I still see the same behaviour.  I assume the November 
build would have a fix made in October, but I don't know how the process 
actually works...

--
components: Library (Lib)
messages: 256463
nosy: Chris Tozer
priority: normal
severity: normal
status: open
title: textwrap.dedent doesn't find common substring when spaces and tabs are 
mixed
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue25871>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25871] textwrap.dedent doesn't find common substring when spaces and tabs are mixed

2015-12-15 Thread Chris Tozer

Chris Tozer added the comment:

Yeah sorry - I am stuck on a baked-at-2.7.5 version thanks to CentOS.  I was 
misled by the banner telling me it was more recent than the fix.

I'll just close, I'm sure the fix in 2.7.11 is good, per issue 21827.

--
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue25871>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com