Skip to content

Commit d63dbdb

Browse files
committed
solved is_match fast and correct (minor fixes)
1 parent abf2b83 commit d63dbdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

py3/hard/is_match/is_match.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def __init__(self, c, prev):
3636
def match(self, s, place):
3737
if place >= len(s):
3838
if self.any_quantity:
39-
return self.next is None
39+
if self.next:
40+
return self.next.match(s, place)
41+
return True
4042
return False
4143

4244
if self.any:

0 commit comments

Comments
 (0)