[Python-ideas] PEP 505: None-aware operators

Brice Parent contact at brice.xyz
Sun Jul 29 06:20:16 EDT 2018


Le 29/07/2018 à 09:12, Abe Dillon a écrit :

>
[...]
>
> NO! I'm proposing:
>
> spam.eggs.cheese.aardvark?
>
> A single POSTFIX operator that has a high priority in the order of 
> operations.
I don't believe we need spam?.eggs.cheese?.aardvark, because I don't 
think it is justified by the small benefits it gets us.
For the same reason, I don't believe we need spam.eggs.cheese.aardvark? 
(there is exactly the same number of use cases). We win a bit in 
readability as it's closer to most spoken languages, but we lose in 
granularity as we're hiding any error that would raise if spam.eggs 
returned None, so it's not a full win on this side either...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180729/0b3cd76d/attachment.html>


More information about the Python-ideas mailing list