Eric V. Smith added the comment: I was just logging in to make this point, but Serhiy beat me to it. When I wrote several years ago that this was "easy", it was before the (awesome) PEP 393 work. I suspect, but have not verified, that having a bytes version of this code would now require an implementation that shared very little with the str version.
So I think Martin's advice to just encode to ascii is the best course of action. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3982> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com