4 ms·
You can also hack the with statement to get a let block: import contextlib @contextlib.contextmanager def let(*values): yield values
by piinbinary 12y ago
You can also hack the with statement to get a let block:
import contextlib
@contextlib.contextmanager
def let(*values):
yield values
with let(1, 2, 3) as (a, b, c):
print(a, b, c)