if one_or_none() as foo: do_stuff(foo)
I am not fully up to speed with 3.10, but quickly checked the docs and it doesn't appear to have been added in 3.10 either.
Let me know if I'm missing something.