The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

Jussi Piitulainen jussi.piitulainen at helsinki.fi
Tue Mar 22 09:49:12 EDT 2016


Chris Angelico writes:

> And yeah, the import is an option, but if I'm trying to explain stuff
> to people, it's usually easier to grab a genexp (full flexibility, but
> the complexity) than to play around with importing. When the function
> you want exists and returns true for the things you want, filter() has
> a big win; for any other situation, it's not worth reaching to
> itertools for a specific solution when the generic one will cover this
> and every other case.

True. Filtering is so simple.

The big win for me has been itertools.groupby. The other stuff I mostly
play with for amusement. But hey, nothing frivolous in amusement!



More information about the Python-list mailing list