Skip to content

Commit

Permalink
Add __str__ method for Result
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekker1 committed Jan 13, 2020
1 parent d786fb4 commit b9f9df7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Added
- Add initial ``Checker`` class to allow the usage of MiniZinc solution
checkers.

Changed
^^^^^^^
- The string method for ``Result`` will now refer to the string method of its
``Solution`` attribute.

Fixed
^^^^^
- Ensure the event loop selection on Windows to always selects
Expand Down
3 changes: 3 additions & 0 deletions src/minizinc/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ def __len__(self):
else:
return 1

def __str__(self):
return str(self.solution)


def parse_solution(
raw: bytes, output_type: Type, enum_map: Dict[str, Enum]
Expand Down

0 comments on commit b9f9df7

Please sign in to comment.