News for hackers. Stuff that matters.
Re:Python Tips and Traps by bdevine on Monday January 19, 2015 @03:03PM (#8913735)
Always glad to see tips, tricks, and otherwise for Python. But for anyone checking out Python who sees how useful the defaultdict construct is but doesn't necessarily need nested attributes, the Counter class[0] has been available for some time now. If you just want to keep track of, well, counts, it's very handy and versatile.

[0] https://docs.python.org/3.1/library/collections.html#collect...

Re:Python Tips and Traps by ryan_sb on Tuesday January 20, 2015 @07:12AM (#8916543)
Totally true, I'll add that in