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

Grégory Lielens gregory.lielens at gmail.com
Sun Jul 22 10:02:26 EDT 2018


Short circuit if the first argument is NOT None, I guess? ;-)

Yes, so a short circuit is sometimes good. Not often imho, for a default triggered by None, but sometimes...
In the case it is, do you want it to be hidden in an expression? Usually it would be better to draw attention, when the default is either costly to compute, or worse, it's evaluation have side effect. I would use an old fashioned if in those cases...


More information about the Python-ideas mailing list