diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-04-01 01:21:09 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-04-01 01:21:09 (GMT) |
commit | f8521d55ad8f3d52bdf7a350214581e2888c0361 (patch) | |
tree | d373051644eba2b7ac8965a1ff0bcb69d058ca10 /Doc | |
parent | 70a46f635fc89ed20310fdb674b9eff87a907afb (diff) | |
parent | 8218bd4caf683ee98c450a093bf171dbca6c4849 (diff) | |
download | cpython-f8521d55ad8f3d52bdf7a350214581e2888c0361.zip cpython-f8521d55ad8f3d52bdf7a350214581e2888c0361.tar.gz cpython-f8521d55ad8f3d52bdf7a350214581e2888c0361.tar.bz2 |
merge 3.4 (#12855)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/stdtypes.rst | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 739e90d..a0dfc4c 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1855,10 +1855,42 @@ expression support in the :mod:`re` module). .. method:: str.splitlines([keepends]) - Return a list of the lines in the string, breaking at line boundaries. - This method uses the :term:`universal newlines` approach to splitting lines. - Line breaks are not included in the resulting list unless *keepends* is - given and true. + 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. + + This method splits on the following line boundaries. In particular, the + boundaries are a superset of :term:`universal newlines`. + + +-----------------------+-----------------------------+ + | Representation | Description | + +=======================+=============================+ + | ``\n`` | Line Feed | + +-----------------------+-----------------------------+ + | ``\r`` | Carriage Return | + +-----------------------+-----------------------------+ + | ``\r\n`` | Carriage Return + Line Feed | + +-----------------------+-----------------------------+ + | ``\v`` or ``\x0b`` | Line Tabulation | + +-----------------------+-----------------------------+ + | ``\f`` or ``\x0c`` | Form Feed | + +-----------------------+-----------------------------+ + | ``\x1c`` | File Separator | + +-----------------------+-----------------------------+ + | ``\x1d`` | Group Separator | + +-----------------------+-----------------------------+ + | ``\x1e`` | Record Separator | + +-----------------------+-----------------------------+ + | ``\x85`` | Next Line (C1 Control Code) | + +-----------------------+-----------------------------+ + | ``\u2028`` | Line Separator | + +-----------------------+-----------------------------+ + | ``\u2029`` | Paragraph Separator | + +-----------------------+-----------------------------+ + + .. versionchanged:: 3.2 + + ``\v`` and ``\f`` added to list of line boundaries. For example:: |