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-July/154257.html below:

[Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

[Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...] [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jul 4 02:54:55 EDT 2018
Steven D'Aprano wrote:
> - list builder syntax is syntax which returns a list;
> 
> - dict builder syntax is syntax which returns a dict;
> 
> - set builder syntax is syntax which returns a set;
> 
> - generator builder syntax is syntax which returns a generator.

You only get a list/dict/set from the first three after
you've run the iterators within it, but with a generator
expression, you already have a generator before you've
run it. That makes it feel different to me.

-- 
Greg
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