[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2018-08-26 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hey Nick, Serhiy

The patch is up for your review. Any updates on this?

--

___
Python tracker 

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



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2017-12-30 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
pull_requests: +4932

___
Python tracker 

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



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2017-12-08 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Ezra, can you please convert your patch to a Pull Request on Github?

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2014-06-22 Thread YJ Chen

Changes by YJ Chen chen.yanj...@gmail.com:


--
nosy: +robertjli, yjchen

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2014-06-20 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ezra's patch is working, but a little non-optimal.

However, I'm not sure, that it is right to extend a set of whitespace 
characters. See comments at the top of the file.

Also this approach should be slower, especially for trivial case (no changes).

--
nosy: +serhiy.storchaka
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-11 Thread Ezra Berch

Ezra Berch added the comment:

Here's a patch to do this, including some tests for the changed behavior.

--
keywords: +patch
nosy: +ezberch
Added file: http://bugs.python.org/file28285/issue15045.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-05 Thread Bruno Dupuis

Changes by Bruno Dupuis bdup...@lisael.org:


--
nosy: +bruno.dupuis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-06-11 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

In working on #13857, I noticed that the current regex based implementation of 
textwrap.dedent() is limited specifically to ASCII whitespace (tabs and spaces) 
with Unix line endings (a line containing solely a Windows \r\n line ending 
will be deemed to contain a non-whitespace character, since \r isn't 
recognised by the regex)

The new textwrap.indent() function added in #13857 takes a much simpler 
approach to whitespace handling: its definition of a line is exactly that of 
text.splitlines(True), while its definition of a line that does not consist 
solely of whitespace is bool(line.strip())

As a simple example of how that can make a difference, consider:

 \N{NO-BREAK SPACE}.strip()
''

One way to remedy this would be to replace the regex based implementation of 
textwrap.dedent with a simpler one written in terms of text.splitlines(True) 
and line.strip().

--
components: Library (Lib)
messages: 162617
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Make textwrap.dedent() consistent with str.splitlines(True) and 
str.strip()
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com