Alex Gaynor added the comment: encode("ascii") has data dependent branches, so it's to be avoided. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue21306> _______________________________________