by jnwatson · 6y ago · 0 comments
ctx_mgr = foo() if bar else nullcontext() with ctx_mgr: ...
with (ctx_mgr := foo() if bar else nullcontext()): ...