[Python-ideas] PEP 505 (None coalescing operators) thoughts

Rob Cliffe rob.cliffe at btinternet.com
Wed Sep 30 13:00:19 CEST 2015


Or:
     x = a orelse b        # Visual Basic has a short-circuiting OrElse 
operator for boolean operands
     x = a orifNone b


On 30/09/2015 01:39, Ryan Gonzalez wrote:
> What about 'otherwise'?
>
> x = a otherwise b
>
>
> On September 29, 2015 6:57:39 PM CDT, Andrew Barnert via Python-ideas 
> <python-ideas at python.org> wrote:
>
>     LOn Sep 29, 2015, at 16:27, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>
>         Emile van Sebille wrote:
>
>             x = foo nor 'foo was None' 
>
>         Cute, but unfortunately it conflicts with established usage of
>         the word 'nor', which would suggest that a nor b == not (a or b). 
>
>
>     Agreed. If this is going to be a keyword rather than a symbol, it really has to read like English, or at least like abbreviated English, with the right meaning--something like "foo, falling back to 'foo was None' if needed".  Something that reads like English with a completely different meaning is a bad idea.
>
>     ------------------------------------------------------------------------
>
>     Python-ideas mailing list
>     Python-ideas at python.org
>     https://mail.python.org/mailman/listinfo/python-ideas
>     Code of Conduct:http://python.org/psf/codeofconduct/
>
> -- Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity. 
> CURRENTLY LISTENING TO: Vermilion Fire (Final Fantasy Type-0)
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150930/b8854d57/attachment.html>


More information about the Python-ideas mailing list