Tim Peters <t...@python.org> added the comment:
Well, I have no code that would benefit from this change. What's the point? Sure, I use _parts_ of hash codes at times, but, e.g., index = the_hash_code & SOME_LOW_BIT_MASK in Python couldn't care less about the sign of `the_hash_code` - it returns a non-negative int regardless. The same applies if, e.g., SOME_LOW_BIT_MASK is `(1 << sys.hash_info.hash_bits) - 1`, giving a full-width non-negative hash without losing a bit of "entropy". But I've never felt a need for the latter. Likewise for doing, e.g., index = the_hash_code % SOME_POSITIVE_PRIME in Python. % takes the sign (positive here) of the modulus in Python. So this _looks_ like pointlessly disruptive code churn to me. What killer use case am I missing? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37807> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com