File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2704,7 +2704,9 @@ expression support in the :mod:`re` module).
27042704
27052705 ``\v `` and ``\f `` added to list of line boundaries.
27062706
2707- For example::
2707+ For example:
2708+
2709+ .. doctest ::
27082710
27092711 >>> ' ab c\n\n de fg\r kl\r\n ' .splitlines()
27102712 ['ab c', '', 'de fg', 'kl']
@@ -2713,14 +2715,18 @@ expression support in the :mod:`re` module).
27132715
27142716 Unlike :meth: `~str.split ` when a delimiter string *sep * is given, this
27152717 method returns an empty list for the empty string, and a terminal line
2716- break does not result in an extra line::
2718+ break does not result in an extra line:
2719+
2720+ .. doctest ::
27172721
27182722 >>> " " .splitlines()
27192723 []
27202724 >>> " One line\n " .splitlines()
27212725 ['One line']
27222726
2723- For comparison, ``split('\n') `` gives::
2727+ For comparison, ``split('\n') `` gives:
2728+
2729+ .. doctest ::
27242730
27252731 >>> ' ' .split(' \n ' )
27262732 ['']
You can’t perform that action at this time.
0 commit comments