PEP 8.
Don't use 'assert' for non-testing runtime errors.
No 'has_key'.
Add support for Python 3.2 / 3.3.