[docs] [issue12855] linebreak sequences should be better documented
report at bugs.python.org
Tue Aug 30 10:22:54 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
> Would it be better to put this note in a different place?
You may just say that StreamReader.readline() uses unicode.splitlines(), and so point to unicode.splitlines() doc (use :meth:`unicode.splitlines` syntax). unicode.splitlines() is now well documented: line boundaries are not listed, even in Python 3 documentation.
Unicode line boundaries used by Python 2.7 and 3.3:
U+000A: Line feed
U+000B: Line tabulation
U+000C: Form feed
U+000D: Carriage return
U+001C: File separator
U+001D: Group separator
U+001E: Record separator
U+2028: Line separator
U+2029: Paragraph separator
> It looks like \x0b and \x0c (vertical tab and form feed) were first
> considered line breaks in Python 2.7
Correct: U+000B and U+000C were added to Python 2.7 and 3.2.
> It might be worth putting a "changed in 2.7" note somewhere in the docs
We add the following syntax exactly for this:
.. versionchanged:: 2.6
Also unset environment variables when calling :meth:`os.environ.clear`
If you downloaded Python source code, go into Doc/ directory and run "make html" to compile the doc to HTML.
Python tracker <report at bugs.python.org>
More information about the docs