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-April/153012.html below:

[Python-Dev] assignment expressions: an alternative proposal

[Python-Dev] assignment expressions: an alternative proposal [Python-Dev] assignment expressions: an alternative proposalCameron Simpson cs at cskk.id.au
Tue Apr 24 18:32:27 EDT 2018
On 24Apr2018 08:51, Ethan Furman <ethan at stoneleaf.us> wrote:
>>When I compare to variables from outer scopes they *usually* are on
>>the *right* side of '=='.
>
>You mean something like
>
>  if 2 == x:
>
>?  I never write code like that, and I haven't seen it, either.

Just to this, I also never write code like that but I've certainly seen it 
advocated.

I think the rationale was that it places the comparison value foremost in one's 
mind, versus the name being tested. I'm not persuaded, but it is another 
subjective situation.

Cheers,
Cameron Simpson <cs at cskk.id.au>
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