[Python-3000] Should str and bytes hash equally?

Adam Olsen rhamph at gmail.com
Thu Dec 13 23:46:08 CET 2007


On Dec 13, 2007 3:42 PM, Alexandre Vassalotti <alexandre at peadrop.com> wrote:
> In Python 2.x, having the byte string and unicode hash equally was
> desirable, since u'' == ''. But since the bytes and str are always
> considered unequal, in Python 3k, I think would be good idea to make
> their hash unequal too. So, what do you think?

It's irrelevant.  It's always possible to get the same hashes.  We'd
need a performance reason or the like to bother changing either of
them.

-- 
Adam Olsen, aka Rhamphoryncus


More information about the Python-3000 mailing list