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

2018年7月03日 23:57:44 -0700

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
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to