https://github.com/joeyajames/Python/issues/166