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

Skip to content

Commit 69675b2

Browse files
author
scls19fr
authored
Update __init__.py
1 parent 10d8195 commit 69675b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

constraint/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ def getSolutionIter(self):
262262
True
263263
>>> problem.addVariables(["a"], [42])
264264
>>> iter = problem.getSolutionIter()
265-
>>> iter.next()
265+
>>> next(iter)
266266
{'a': 42}
267-
>>> iter.next()
267+
>>> next(iter)
268268
Traceback (most recent call last):
269269
File "<stdin>", line 1, in ?
270270
StopIteration
@@ -540,7 +540,7 @@ def getSolutionIter(self, domains, constraints, vconstraints):
540540
def getSolution(self, domains, constraints, vconstraints):
541541
iter = self.getSolutionIter(domains, constraints, vconstraints)
542542
try:
543-
return iter.next()
543+
return next(iter)
544544
except StopIteration:
545545
return None
546546

0 commit comments

Comments
 (0)