Vasco Rodrigues <[EMAIL PROTECTED]> added the comment:

You could just make a check for unicode strings and issue the encode in
the hash function.
I understand the byte abstraction, but if you issue an encode on a
unicode string with only ascii chars it gets converted to the same in
ascii, result will be the same.

So i got to do md5(u'joão'.encode("utf-8"))?
Wasn't unicode becoming the default?

If I do md5(u'john'), it works. And that's a unicode string. It should
have told me, no unicode then...

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2948>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to