Re: PEP 505 (None-aware operators) for Python 3.11

"Maarten Nieber" <[email protected]> Thu, 15 Sep 2022 07:15:08 -0000
Newsgroups gmane.comp.python.devel
Message-ID <[email protected]>
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