[Python-checkins] cpython (merge 3.2 -> default): Merge with 3.2.
georg.brandl
python-checkins at python.org
Sat Mar 10 09:23:28 CET 2012
http://hg.python.org/cpython/rev/7e8ac22a4cf2
changeset: 75514:7e8ac22a4cf2
parent: 75511:ba8f85e16dd9
parent: 75513:b96251d9f36a
user: Georg Brandl <georg at python.org>
date: Sat Mar 10 09:27:30 2012 +0100
summary:
Merge with 3.2.
files:
Doc/reference/compound_stmts.rst | 5 +++++
Lib/re.py | 11 ++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -535,6 +535,11 @@
access the local variables of the function containing the def. See section
:ref:`naming` for details.
+.. seealso::
+
+ :pep:`3107` - Function Annotations
+ The original specification for function annotations.
+
.. _class:
diff --git a/Lib/re.py b/Lib/re.py
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -179,14 +179,19 @@
def split(pattern, string, maxsplit=0, flags=0):
"""Split the source string by the occurrences of the pattern,
- returning a list containing the resulting substrings."""
+ returning a list containing the resulting substrings. If
+ capturing parentheses are used in pattern, then the text of all
+ groups in the pattern are also returned as part of the resulting
+ list. If maxsplit is nonzero, at most maxsplit splits occur,
+ and the remainder of the string is returned as the final element
+ of the list."""
return _compile(pattern, flags).split(string, maxsplit)
def findall(pattern, string, flags=0):
"""Return a list of all non-overlapping matches in the string.
- If one or more groups are present in the pattern, return a
- list of groups; this will be a list of tuples if the pattern
+ If one or more capturing groups are present in the pattern, return
+ a list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result."""
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list