[Steven D'Aprano <st...@pearwood.info>]
> ...
> If we could look forward to 2028, when we're running Python 3.14 or so
> (4.7 if you prefer), how many fantastic language features that we cannot
> bear to give up would we be missing out on?

This, for just one:

    k = 6 if >!{myobj.meth(arg)[2]} elsenone 7 elsenan 8 else 5

Which is really annoying to write today, but would be much clearer
with binding expressions:

    if myobj is None:
        k = 7
    elif (t := myobj.meth) is None:
        k = 7
    elif (t := t(arg)) is None:
        k = 7
    elif (t := t[2]) is None:
        k = 7
    eiif math.isnan(t):
        k = 8
    elif t:
        k = 6
    else:
        k = 5

The future is blindingly bright :-)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to