[Python-Dev] Why can't I encode/decode base64 without importing a module?

Stephen J. Turnbull stephen at xemacs.org
Mon Apr 22 17:01:38 CEST 2013


Devin Jeanpierre writes:

 > why does 'abc'.encode('unicode_escape') return bytes?

Duck-typing: encode always turns unicode into bytes.



More information about the Python-Dev mailing list