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/2015-January/137929.html below:

[Python-Dev] Any grammar experts?

[Python-Dev] Any grammar experts? [Python-Dev] Any grammar experts?Serhiy Storchaka storchaka at gmail.com
Mon Jan 26 21:50:08 CET 2015
On 26.01.15 00:59, Guido van Rossum wrote:
> Interestingly, the non-dict versions can all be written today using a
> double-nested comprehension, e.g. {**x for x in it} can be written as:
>
>      {x for x in xs for xs in it}

      {x for xs in it for x in xs}

> But it's not so straightforward for dict comprehensions -- you'd have to
> switch to calling dict():
>
>      dict(x for x in xs for xs in it)

      {k: v for xs in it for k, v in xs.items()}

So actually this is just a syntax sugar.


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