News for hackers. Stuff that matters.
Re:A look at some of Python's useful itertools by shavenwarthog2 on Saturday May 25, 2013 @04:16PM (#5768672)
Seconded. I use itertools constantly for data-wrangling on network server and web applications. Specifically:

- processing files with imap and ifilter to rapidly grab data, find a subset of it, then process it with a function

- defaultdict(list) is incredibly useful for collecting data, arranging it by a certain key (like date or object id), then collecting into a list

- namedtuple is occasionally useful for efficiently stuffing data into an object with a few named attributes.

There are no comments on this comment yet.