~~~python
class Player:
def __enter__(self):
print('enter')
return self
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_tb:
print("process exp")
else:
print("no exception")
print('exit')
return True
with Player() as player:
print('player with')
print(player)
~~~