Hi Maarten,
I like the suggestion but I'm not sure if the real problem with the PEP505
is the symbol/operator used.
Reading through the whole discussion I'm under the impression that the idea
of the None value being treated as an indicator of the missing attribute is
what prevents this PEP from happening.

Apart from that I'm all for it, (probably) regardless of the syntax (as
long as it remains short).

Best regards,
Piotr

On Thu, Sep 15, 2022 at 5:07 PM Maarten Nieber <mnie...@gmail.com> wrote:

> Hi, I wanted to propose replacing ? with -> in the none aware syntax. This
> makes the expression look like a chain, and I think that most people
> intuitively can understand how the chain might get broken (and what would
> happen in that case). For example:
>
> zipcode = person->.address->['zipcode']
>
> I've proposed this alternative syntax on Doug's github project, and I
> think he didn't like it so much (or at least, his co-contributor didn't
> like it), but I still wanted to propose it here as well, because I do think
> it's a good solution to the complaints that the ? operator looks cryptic.
>
> Best regards,
> Maarten
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/UNK66ZORXDNX22IDDFWJHDHVZGPBQETT/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/5E732BVBR3CSZEDKXREVQULDBH2GUZHN/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to