diff -r bb7b14dd5ded Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst Mon Aug 29 09:37:07 2011 +0200 +++ b/Doc/library/stdtypes.rst Tue Aug 30 21:57:20 2011 -0400 @@ -1187,6 +1187,40 @@ breaks are not included in the resulting list unless *keepends* is given and true. + Python recognizes ``"\r"``, ``"\n"``, and ``"\r\n"`` as line boundaries for + strings. + +.. method:: unicode.splitlines([keepends]) + + Return a list of the lines in the string, breaking at line boundaries. Line + breaks are not included in the resulting list unless *keepends* is given and + true. + + Unicode strings can have the following line boundaries: + + +-----------------------+-----------------------------+ + | Representation | Description | + +=======================+=============================+ + | ``u"\n"`` | Line Feed | + +-----------------------+-----------------------------+ + | ``u"\r"`` | Carriage Return | + +-----------------------+-----------------------------+ + | ``u"\r\n"`` | Carriage Return + Line Feed | + +-----------------------+-----------------------------+ + | ``u"\x0b"`` | Line Tabulation | + +-----------------------+-----------------------------+ + | ``u"\x0c"`` | Form Feed | + +-----------------------+-----------------------------+ + | ``u"\x85"`` | Next Line (C1 Control Code) | + +-----------------------+-----------------------------+ + | ``u"\u2028"`` | Line Separator | + +-----------------------+-----------------------------+ + | ``u"\u2029"`` | Paragraph Separator | + +-----------------------+-----------------------------+ + + .. versionchanged:: 2.7 + ``\x0b`` and ``\x0c`` added to list of line boundaries. + .. method:: str.startswith(prefix[, start[, end]])