Skip to content

Commit

Permalink
add __expr__ for mag class (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippotto authored Jul 29, 2020
1 parent ba415a5 commit 80acf22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wkcuber/mag.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def __eq__(self, other):
def __str__(self):
return self.to_layer_name()

def __expr__(self):
return f"Mag({self.to_layer_name()})"

def to_layer_name(self):
x, y, z = self.mag
if x == y and y == z:
Expand Down

0 comments on commit 80acf22

Please sign in to comment.