[Python-ideas] Integrate some itertools into the Python syntax

Ethan Furman ethan at stoneleaf.us
Fri Mar 25 18:34:13 EDT 2016


On 03/25/2016 03:16 PM, Michel Desmoulin wrote:

> The (x * x for x in random.randint(100000) if x % 3 == 0) is just here
> to stand for "rich generators". The example is artificial, but every
> advanced python code out there use generator.

True, but without a useful comment it was easy to miss that this line 
was not the feature.

> The feature is on the for loop, which is simple and elegant.

True.

> What you're doing here is trolling, really.

Just because you don't like it doesn't make it trolling.

--
~Ethan~


More information about the Python-ideas mailing list