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/2017-November/150734.html below:

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

[Python-Dev] Tricky way of of creating a generator via a comprehension expression [Python-Dev] Tricky way of of creating a generator via a comprehension expressionEthan Furman ethan at stoneleaf.us
Wed Nov 22 19:30:39 EST 2017
On 11/22/2017 01:40 PM, Ivan Levkivskyi wrote:
> 22 Лис 2017 22:33 "Ethan Furman" <ethan at stoneleaf.us <mailto:ethan at stoneleaf.us>> пише:

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