Questions about `?.` syntax

Is it possible that you misunderstood the PEP 505 ?. operator? Or were you proposing something new? PEP 505 is about None-aware operators, and ?. checks if the attribute is none—not missing. Your missing attribute idea is like a rudimentary protocol check (just one attribute rather than a set), and a protocol is a rudimentary instance check (just checks attributes rather than true inheritance). So, it seems to be off topic for this thread, and should be in its own thread?

If you decide to start a new thread for your idea, my personal opinion is that you should rarely switch on types, but use polymorphism instead. (If you have to switch on types, isinstance and match are good ways to do it.) And since it’s so rare, I don’t see why it would be “needed repeatedly”. So, if you do start a thread, it might be useful to provide a real world example.