# Questions about \`?.\` syntax

**URL:** <https://discuss.python.org/t/questions-about-syntax/29993>\
**Category:** Python Help\
**Created:** [July 20, 2023, 12:31pm UTC](https://discuss.python.org/t/questions-about-syntax/29993 "2023-07-20T12:31:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![NeilGirdhar](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/neilgirdhar/32/5776_2.png) [@NeilGirdhar](https://discuss.python.org/u/NeilGirdhar)\
**Post date:** [July 20, 2023, 2:23pm UTC](https://discuss.python.org/t/questions-about-syntax/29993/4 "2023-07-20T14:23:34Z")

</div>

> [@gdfrj](#):
>
> - IMO it hinders readability when needed repeatedly

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.

---

_[View the full topic](https://discuss.python.org/t/questions-about-syntax/29993)._
