We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a927248 commit 7db1b00Copy full SHA for 7db1b00
1 file changed
rocketpy/simulation/events.py
@@ -154,8 +154,14 @@ def __verify_action(self, action):
154
return action
155
156
def __repr__(self):
157
- # TODO: Implement a more informative string representation of the Event object.
158
- pass
+ # .__self__ gets the Flight object
+ # .__name__ gets the function name 'handle_out_of_rail_event'
159
+ return (
160
+ f"Event(name={self.name!r}, "
161
+ f"trigger={self.trigger.__name__}, "
162
+ f"action={self.action.__self__.__class__.__name__}.{self.action.__name__}, "
163
+ f"event_context={self.event_context})"
164
+ )
165
166
def __str__(self):
167
# TODO: Implement a more informative string representation of the Event object.
0 commit comments