Skip to content

Commit bee0691

Browse files
committed
Add __repr__ to BoutOptions
Not the best, because `eval(repr(f)) != f`, but more useful than nothing
1 parent 7f78688 commit bee0691

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/boutdata/data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ def format_inline_comment(name, options):
479479

480480
return f.getvalue()
481481

482+
def __repr__(self):
483+
return self.as_dict()
484+
482485
def get_bool(self, name, default=None):
483486
"""
484487
Convert an option value to a bool, in (almost) the same way as BOUT++.

0 commit comments

Comments
 (0)