Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
11c84721
Commit
11c84721
authored
Mar 10, 2012
by
Georg Brandl
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 3.2.
parents
d31e3ab2
c9b6aebe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
Doc/reference/compound_stmts.rst
Doc/reference/compound_stmts.rst
+5
-0
Lib/re.py
Lib/re.py
+8
-3
No files found.
Doc/reference/compound_stmts.rst
View file @
11c84721
...
...
@@ -535,6 +535,11 @@ returned or passed around. Free variables used in the nested function can
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:
...
...
Lib/re.py
View file @
11c84721
...
...
@@ -179,14 +179,19 @@ def subn(pattern, repl, string, count=0, flags=0):
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."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment