A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2018-April/153279.html below:

[Python-Dev] PEP 572: Assignment Expressions

[Python-Dev] PEP 572: Assignment Expressions [Python-Dev] PEP 572: Assignment ExpressionsLarry Hastings larry at hastings.org
Mon Apr 30 20:27:08 EDT 2018
On 04/30/2018 07:30 AM, Mark Shannon wrote:
> Would Python be better with two subtly different assignment operators?
> The answer of "no" seems self evident to me.

Maybe this has been covered in the thread earlier--if so, I missed it, 
sorry.  But ISTM that Python already has multiple ways to perform an 
assignment.

All these statements assign to x:

    x = y
    for x in y:
    with y as x:
    except Exception as x:

And, if you want to get *super* pedantic:

    import x
    def x(): ...
    class x: ...

I remain -1 on 572, but I'm not sure it can genuinely be said that 
Python only has one way to assign a value to a variable.


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180430/e2d60571/attachment.html>
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