Skip to content

Commit

Permalink
D. Jabs:
Browse files Browse the repository at this point in the history
- Minor change in constraint.py
  • Loading branch information
Dennis Jabs committed Oct 11, 2023
1 parent 3e3cbec commit 5ed5bfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PyCSP/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def satisfied(self, assignment: dict[V, D]) -> bool:
Returns:
bool: True, if all variables assigned with the domain fulfills the condition
"""
visited = set([self._domain])
visited = {self._domain}
for variable in self._variables:
if variable in assignment and assignment[variable] not in visited:
# Case: Found x-th variable which has a different value
Expand Down Expand Up @@ -173,7 +173,7 @@ def satisfied(self, assignment: dict[V, D]) -> bool:
Returns:
bool: True, if all variables assigned with the domain fulfills the condition
"""
visited = set([self._domain])
visited = {self._domain}
for variable in self._variables:
if variable in assignment and assignment[variable] in visited:
# Case: Found x-th variable which has the same value
Expand Down

0 comments on commit 5ed5bfd

Please sign in to comment.