File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,9 @@ def __nonzero__(self):
199199 """MatchesIterator is False when word hasn't been replaced yet"""
200200 return self .index != - 1
201201
202+ def __bool__ (self ):
203+ return self .__nonzero__ ()
204+
202205 @property
203206 def candidate_selected (self ):
204207 """True when word selected/replaced, False when word hasn't been replaced yet"""
@@ -212,10 +215,13 @@ def current(self):
212215 raise ValueError ('No current match.' )
213216 return self .matches [self .index ]
214217
215- def next (self ):
218+ def __next__ (self ):
216219 self .index = (self .index + 1 ) % len (self .matches )
217220 return self .matches [self .index ]
218221
222+ def next (self ):
223+ return self .__next__ ()
224+
219225 def previous (self ):
220226 if self .index <= 0 :
221227 self .index = len (self .matches )
You can’t perform that action at this time.
0 commit comments