Add Python 2 compatibility
Check whether max raises ValueError
Python 3 shebang