Data Science, Product Analytics, Simulation, Deep Dives, Programming.
self.type = event_type self.time = time def __str__(self): if self.type == 'agent_ready_for_task': return '%s (%s) - %s' % (self.type, self.agent.name, self.time) return '%s - %s' % (self.type, self.time) Then, I implement a separate subclass for each event type that might have a bit different