Learned a new #Python trick on the job:
#programming
@contextmanager
def func(…):
resource = …
try:
yield resource
finally:
…
#programming
like this
reshared this