News for hackers. Stuff that matters.
Re:The Elements of Python Style by user9756 on Tuesday January 05, 2016 @04:44AM (#10842333)
>But another good example is rewriting an if/else chain as a dictionary lookup or repetitive code as a tuple of operations followed by a for loop.

I'm familiar with the dictionary lookup method but not the tuple. Perhaps it's obvious but could someone please give an example?

There are no comments on this comment yet.