Fixed comparison / ordering of object for Python3. Thanks flake8!