Nick Coghlan <ncogh...@gmail.com> added the comment: The origin of the unnecessary hashfunc casts is just me following some of the more specific examples of filling in the tp_hash slot too closely without checking if the cast was still needed.
I'll apply and backport Hagen's patches to 3.0 soon (as well as fixing some other non-hashable types such as slice() to use PyHash_NotImplemented), but first I want to understand why range() exhibits this behaviour, while other classes with a superficially similar implementation (such as bytearray) do not. ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4701> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com