A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-May/153486.html below:

[Python-Dev] Slow down...

[Python-Dev] Slow down... [Python-Dev] Slow down...Tim Peters tim.peters at gmail.com
Wed May 9 00:50:02 EDT 2018
[Steven D'Aprano <steve at 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 :-)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4