[Python-ideas] Null coalescing operators

Andrew Barnert abarnert at yahoo.com
Mon Sep 21 11:05:33 CEST 2015


On Sep 21, 2015, at 01:48, Stephen J. Turnbull <stephen at xemacs.org> wrote:

>>>>> retries = default else cls.DEFAULT
> 
> I kinda like this if-less else syntax for the symmetry with else-less
> if.  

How do you parse this:

    a if b else c else d

Feel free to answer either as a human reader or as CPython's LL(1) parser.



More information about the Python-ideas mailing list