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

Skip to content

Commit e06cbb8

Browse files
author
Fredrik Lundh
committed
bug #436596
re.findall doesn't take a maxsplit argument
1 parent fd44eab commit e06cbb8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/sre.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ def split(pattern, string, maxsplit=0):
7575
returning a list containing the resulting substrings."""
7676
return _compile(pattern, 0).split(string, maxsplit)
7777

78-
def findall(pattern, string, maxsplit=0):
78+
def findall(pattern, string):
7979
"""Return a list of all non-overlapping matches in the string.
8080
8181
If one or more groups are present in the pattern, return a
8282
list of groups; this will be a list of tuples if the pattern
8383
has more than one group.
8484
8585
Empty matches are included in the result."""
86-
return _compile(pattern, 0).findall(string, maxsplit)
86+
return _compile(pattern, 0).findall(string)
8787

8888
def compile(pattern, flags=0):
8989
"Compile a regular expression pattern, returning a pattern object."

0 commit comments

Comments
 (0)