Skip to content

Commit 05b3857

Browse files
committed
Implement repr for Step objects
1 parent 5dff815 commit 05b3857

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stagpy/_step.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,12 @@ def __init__(self, istep, sdat):
521521
self.rprofs = _Rprofs(self)
522522
self._isnap = UNDETERMINED
523523

524+
def __repr__(self):
525+
if self.isnap is not None:
526+
return f'{self.sdat!r}.snaps[{self.isnap}]'
527+
else:
528+
return f'{self.sdat!r}.steps[{self.istep}]'
529+
524530
@property
525531
def geom(self):
526532
"""Geometry information.

0 commit comments

Comments
 (0)