Python Cool Tricks

Nice. Some are exotic, but list comprehensions, the empty string trick are commonly handy, and the json pretty-printing maybe less so but good to know. The note about dir() and help() are great if you’re not already familiar (you should be). The Python enum trick is a new one by me: class PlayerRanking: Bolt, Green, Johnson,…

Unicode Escape Formats

The escape syntax for Unicode characters in every language, format and notation I’ve ever seen, and quite a few beyond. Handy.

Scott Hanselman’s 2009 Tool List

Excellent round up of utilities, web sites and more for developers and power users. Only thing he missed is TSE 🙂


10 Unique Ruby Features

The 10, but 3 (implicit return values) and 8 (only nil+false are False) are negative features. FYI here’s the 10 and how they compare with Python: Objects everywhere! — Python supports OO but not solely, and has strong reflection features regardless of objects or not Blocks — Python’s function objects and ‘with’ keyword and list…


argparse = OptParse++

Looks like someone built a better mousetrap for command-line parsing in Python. Unfortunately, OptParse is already pretty good, argparse is better but not significantly for most folks, and OptParse is already in the standard Python Library (has been for years). Makes it hard to untrench the incumbent.