News for hackers. Stuff that matters.
Re:Code Like a Pythonista: Idiomatic Python by epenn on Saturday October 22, 2011 @01:55PM (#3143942)
one thing I didn't see mentioned is switching from "if s.find(c) == -1: ..." to "if c in s: ...". I see people do that a lot.

I think this is covered implicitly by the two "Use in where possible" sections. Although as Tim Peter's The Zen of Python states, which is also quoted in the tutorial, "explicit is better than implicit." If people are doing that despite knowledge of the in keyword then I suppose that just proves Tim's point.

Re:Code Like a Pythonista: Idiomatic Python by donatzsky on Sunday October 23, 2011 @02:08PM (#3146788)
I don't know. I'd argue that

  if c not in s: ...
is more explicit (and readable) than

  if s.find(c) == -1: ...