Here the "better" solution (imo) would be support for pattern matching:
match my_map.get(key):
case None:
// do thing (or nothing, i.e., pass)
case Some(val):
// do other thing
Scala seems to have figured out how to get pattern matching over arbitrary data (i.e., not statically-defined algebraic datatypes). I'd like to see this come to Python.
(Normally I'd fight for pattern matching to always provide static type safety guarantees, but in Python it seems completely reasonable to omit such checks.)
EDIT: But you're absolutely right that this is a place where assignment expressions will be used regularly, so thank you for pointing that out!