Issue #5 solution broke compatibility with Python 2.6