Kaydet (Commit) e06cbb8c authored tarafından Fredrik Lundh's avatar Fredrik Lundh

bug #436596

re.findall doesn't take a maxsplit argument
üst fd44eabf
...@@ -75,7 +75,7 @@ def split(pattern, string, maxsplit=0): ...@@ -75,7 +75,7 @@ def split(pattern, string, maxsplit=0):
returning a list containing the resulting substrings.""" returning a list containing the resulting substrings."""
return _compile(pattern, 0).split(string, maxsplit) return _compile(pattern, 0).split(string, maxsplit)
def findall(pattern, string, maxsplit=0): def findall(pattern, string):
"""Return a list of all non-overlapping matches in the string. """Return a list of all non-overlapping matches in the string.
If one or more groups are present in the pattern, return a If one or more groups are present in the pattern, return a
...@@ -83,7 +83,7 @@ def findall(pattern, string, maxsplit=0): ...@@ -83,7 +83,7 @@ def findall(pattern, string, maxsplit=0):
has more than one group. has more than one group.
Empty matches are included in the result.""" Empty matches are included in the result."""
return _compile(pattern, 0).findall(string, maxsplit) return _compile(pattern, 0).findall(string)
def compile(pattern, flags=0): def compile(pattern, flags=0):
"Compile a regular expression pattern, returning a pattern object." "Compile a regular expression pattern, returning a pattern object."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment