[Python-Dev] PEP 572: Assignment Expressions
Tim Peters
tim.peters at gmail.com
Tue Apr 17 23:57:15 EDT 2018
More information about the Python-Dev mailing list
Tue Apr 17 23:57:15 EDT 2018
- Previous message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Next message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Paul Moore] >> the next question will likely be "so why does = exist at all?" [Greg Ewing <greg.ewing at canterbury.ac.nz>] > And if we decide to make ':=' the official assigment operator and > deprectate '=', the next question will be "Why do we have '==' > instead of '='?" Which would be a fine question! In Python's very early days, it didn't have "==" at all: plain "=" was used for both assignment and equality testing. >From the HISTORY file: """ New features in 0.9.6: ... - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is a script that fixes old Python modules """ That script crawled a source tree and replaced instances of "=" used for equality testing with the new-fangled "==". We can obviously do something similar to replace instances of "=" used for assignment when that's removed, and I'm sure nobody will complain about that either ;-)
- Previous message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Next message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list