Serhiy Storchaka added the comment: There are several ways of solving this issue:
1. Verify that an actual int was returned and raise a TypeError if it wasn't. 2. Verify that an actual int was returned and fall back to the hash if it wasn't. 3. Use int.__abs__() instead of abs(), the result will be guaranteed int. The drawback is that this makes a copy of positive integers for int subclasses. 4. Check the sign of the seed and call int.__neg__() for negative values. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31478> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com