[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-14 Thread Ulf Rompe
Change by Ulf Rompe : -- pull_requests: +14569 pull_request: https://github.com/python/cpython/pull/14775 ___ Python tracker ___

[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-14 Thread Ulf Rompe
Change by Ulf Rompe : -- pull_requests: +14564 pull_request: https://github.com/python/cpython/pull/14771 ___ Python tracker ___

[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-13 Thread Ulf Rompe
Ulf Rompe added the comment: Using a re.sub() call as documentation: 1. wouldn't be helpful for many developers. If they need to look up the documentation of a simple method they shouldn't be forced to learn about a more complex one as well to understand it. 2. would be wild guessing since

[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-13 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +14548 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14753 ___ Python tracker

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-08-28 Thread Elliot Edmunds
Elliot Edmunds added the comment: Not sure how helpful it would be to have the re.sub expressions for lstrip and rstrip, but I think it would look like: l_stripped = re.sub(r'^\s*', '', foo) r_stripped = re.sub(r'\s*$', '', foo) -- nosy: +Elliot Edmunds Added file:

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-04-11 Thread Oliver Urs Lenz
Oliver Urs Lenz added the comment: Slightly tangential, but it would be great if the documentation of lstrip() and rstrip() could include an equivalent definition in terms of re.sub(), e.g.: lstrip(foo) == re.sub(r'(?u)\A\s*', '', foo) rstrip(foo) ==

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-31 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-31 Thread Nitish
Change by Nitish : -- nosy: +nitishch ___ Python tracker ___ ___ Python-bugs-list

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-30 Thread Dimitri Papadopoulos Orfanos
Dimitri Papadopoulos Orfanos added the comment: I agree on avoiding a link to str.isspace() and defining "whitespace" instead. However please note there are many de facto definitions of "whitespace". All of them must be documented - or at least the conceptual

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-29 Thread Joel Johnson
Joel Johnson added the comment: I have started working on this and will have a pull request submitted by the end of the week. The term "whitespace" appears in several contextual situations throughout the documentation. While all situations would benefit from the

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-19 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 ___ Python tracker ___

[issue25433] whitespace in strip()/lstrip()/rstrip()

2016-01-04 Thread Dimitri Papadopoulos Orfanos
Dimitri Papadopoulos Orfanos added the comment: In Python 3 the situation is similar: * The Py_UNICODE_ISSPACE macro is used internally to define str.isspace() and wherever Python needs to detect "whitespace" characters in strings. * There is an equivalent function Py_ISSPACE for

[issue25433] whitespace in strip()/lstrip()/rstrip()

2016-01-04 Thread Dimitri Papadopoulos Orfanos
Dimitri Papadopoulos Orfanos added the comment: In Python 2, as far as I can understand, string.whitespace and str.isspace() are different: * str.isspace() is built upon the C isspace() function and is therefore locale-dependant. Python heavily relies on isspace() to detect "whitespace"

[issue25433] whitespace in strip()/lstrip()/rstrip()

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.6 ___ Python tracker

[issue25433] whitespace in strip()/lstrip()/rstrip()

2015-10-18 Thread Dimitri Papadopoulos Orfanos
New submission from Dimitri Papadopoulos Orfanos: The documentation of strip() / lstrip() / rstrip() should define "whitespace" more precisely. The Python 3 documentation refers to "ASCII whitespace" for bytes.strip() / bytes.lstrip() / bytes.rstrip() and "whitespace" for str.strip() /