Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6aacc14

Browse files
committed
Merge with 3.2.
2 parents ba10882 + e144c74 commit 6aacc14

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

Doc/reference/compound_stmts.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,11 @@ returned or passed around. Free variables used in the nested function can
535535
access the local variables of the function containing the def. See section
536536
:ref:`naming` for details.
537537

538+
.. seealso::
539+
540+
:pep:`3107` - Function Annotations
541+
The original specification for function annotations.
542+
538543

539544
.. _class:
540545

Lib/re.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,19 @@ def subn(pattern, repl, string, count=0, flags=0):
179179

180180
def split(pattern, string, maxsplit=0, flags=0):
181181
"""Split the source string by the occurrences of the pattern,
182-
returning a list containing the resulting substrings."""
182+
returning a list containing the resulting substrings. If
183+
capturing parentheses are used in pattern, then the text of all
184+
groups in the pattern are also returned as part of the resulting
185+
list. If maxsplit is nonzero, at most maxsplit splits occur,
186+
and the remainder of the string is returned as the final element
187+
of the list."""
183188
return _compile(pattern, flags).split(string, maxsplit)
184189

185190
def findall(pattern, string, flags=0):
186191
"""Return a list of all non-overlapping matches in the string.
187192
188-
If one or more groups are present in the pattern, return a
189-
list of groups; this will be a list of tuples if the pattern
193+
If one or more capturing groups are present in the pattern, return
194+
a list of groups; this will be a list of tuples if the pattern
190195
has more than one group.
191196
192197
Empty matches are included in the result."""

0 commit comments

Comments
 (0)