Mark Dickinson <dicki...@gmail.com> added the comment: > > - avoids comparing an unsigned long to -1
Just out of interest, why? The cast is unnecessary: there's no ambiguity or undefinedness (the int -1 gets promoted to unsigned long, with wraparound semantics), and neither gcc nor MSVC complains. Other than that, the patch looks fine to me; x ^= x >> 4 would be fine too. I really don't see that it makes much difference either way, since both transformations are reversible and fast enough. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5186> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com