Skip to content

Make Trajectory class a context manager #36

@anshgandhi4

Description

@anshgandhi4

Is your feature request related to a problem? Please describe.
Using Trajectory requires creating an instance of the class, accessing the contents of the trajectory, and then closing it. This can be simplified by converting Trajectory to be compatible with the with keyword.

Describe the solution you'd like
Implement the __enter__ and __exit__ functions in Trajectory to enable this behavior.

Describe alternatives you've considered
The current method is currently captured in the repo README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions