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

Dimitri Papadopoulos Orfanos report at bugs.python.org
Sun Oct 18 08:15:36 EDT 2015

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() / str.lstrip() / str.rstrip(). I suggest the following improvements:
* add a link from "ASCII whitespace" to string.whitespace or bytes.isspace(),
* define plain "whitespace" more precisely (possibly with a link to str.isspace()).

The Python 2 documentation refers to plain "whitespace". As far as I know strip() removes ASCII whitespaces only. If so, please:
* add a link to string.whitespace or str.isspace(),
* improve the string.whitespace documentation and explain that it is locale-dependent (see documentation of str.isspace()).

assignee: docs at python
components: Documentation
messages: 253152
nosy: Dimitri Papadopoulos Orfanos, docs at python
priority: normal
severity: normal
status: open
title: whitespace in strip()/lstrip()/rstrip()
type: enhancement
versions: Python 2.7, Python 3.5

Python tracker <report at bugs.python.org>

More information about the docs mailing list