News for hackers. Stuff that matters.
Re:Hidden Features of Python by mikedougherty on Thursday January 26, 2012 @03:36AM (#3513341)
I'm only done with the first page so far, but I wouldn't call most of these "hidden". Many of them are oft-touted selling points of the language or appear in basic tutorials.

That being said, today I learned about the two-argument form of iter, `iter(f, until)`. So I guess I can't complain too much :D

Re:Hidden Features of Python by googletron on Wednesday January 25, 2012 @02:56PM (#3511425)
I like the dictionaries have get() method tip; So you dont have to worry about unwanted exceptions in code. Then just check for the None case.