Python 3: cmp to key
Merge pull request #369 from tiagoantao/master

Python 3: cmp to key