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-February/152316.html below:

[Python-Dev] The `for y in [x]` idiom in comprehensions

[Python-Dev] The `for y in [x]` idiom in comprehensions [Python-Dev] The `for y in [x]` idiom in comprehensionsAlexander Belopolsky alexander.belopolsky at gmail.com
Tue Feb 27 13:41:19 EST 2018
On Mon, Feb 26, 2018 at 7:51 PM, Guido van Rossum <guido at python.org> wrote:
..
> The reason is that for people who are not Python experts there's no obvious
> reason why `for VAR = EXPR` should mean one thing and `for VAR in EXPR`
> should mean another.

This would be particularly surprising for people exposed to Julia
where these two forms are equivalent:

julia> for x = [1,2] println(x); end
1
2

julia> for x in [1,2] println(x); end
1
2
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