Skip to content

Commit b3a8d9f

Browse files
committed
Fix computing length of lower and upper string, leads to infinite recursion (noticed by @fulibacsi in #4)
1 parent 9d19f90 commit b3a8d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

superstring/superstring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def __init__(self, base):
151151
self._base = base
152152

153153
def length(self):
154-
return self.length()
154+
return self._base.length()
155155

156156
def characterAt(self, index):
157157
return self._base.characterAt(index).lower()
@@ -164,7 +164,7 @@ def __init__(self, base):
164164
self._base = base
165165

166166
def length(self):
167-
return self.length()
167+
return self._base.length()
168168

169169
def characterAt(self, index):
170170
return self._base.characterAt(index).upper()

0 commit comments

Comments
 (0)