Restore compatibility with Python 3.2
Merge pull request #3331 from cgohlke/patch-2

Restore compatibility with Python 3.2