class maze.core.events.event_collection.EventCollection(events: Iterable[maze.core.events.event_record.EventRecord] = ())

A collection of EventRecord instances that can be queried by event specification.

append(event: maze.core.events.event_record.EventRecord)

Append a new event record to the collection.

extend(event_list: Iterable[maze.core.events.event_record.EventRecord])

Extends self.events with a list of new event records.

query_events(event_spec: Union[Callable, Iterable[Callable]]) → Iterable
Return all events collected at the current env step matching one or more given event types. The event

types are specified by the interface member function object itself.

Event calls are recorded as EventRecord, an object providing access to the passed arguments of the event method.


event_spec – Specifies the event type by the interface member function. Can either be a single event type specification or a list of specifications.


An iterable to the event objects.