Re: [Python-Dev] Tricky way of of creating a generator via a comprehension expression

2017年11月22日 16:32:54 -0800

On 11/22/2017 01:40 PM, Ivan Levkivskyi wrote:
22 Лис 2017 22:33 "Ethan Furman" <[email protected] 
<mailto:[email protected]>> пише:
Right, the argument is that calling the `list` constructor should return a list 
-- not a database proxy, not a web
page, and not a generator.
Then you didn't read my example carefully, since the whole point is that the 
list constructor there returns a list.
This example?
try:
 g.send(45)
except StopIteration as e:
 assert e.value == [42, 43, 44]
--
~Ethan~
_______________________________________________
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