mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-30 17:57:30 +00:00
Update core.py (#1627)
This commit is contained in:
@@ -145,9 +145,11 @@ class Env(object):
|
||||
return '<{}<{}>>'.format(type(self).__name__, self.spec.id)
|
||||
|
||||
def __enter__(self):
|
||||
"""Support with-statement for the environment. """
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
"""Support with-statement for the environment. """
|
||||
self.close()
|
||||
# propagate exception
|
||||
return False
|
||||
|
Reference in New Issue
Block a user