Merge pull request #2 from shaunduncan/master

Safely handle assertions for -O
Python 3 compatibility