New submission from Terry J. Reedy <tjre...@udel.edu>: This unconverted example in the 3.1a doc needs a 'b' for 'bytes' added before the three input and output string literals.
>>> import base64 >>> encoded = base64.b64encode('data to be encoded') # here >>> encoded 'ZGF0YSB0byBiZSBlbmNvZGVk' # here >>> data = base64.b64decode(encoded) >>> data 'data to be encoded' #and here Otherwise, TypeError: expected bytes, not str ---------- assignee: georg.brandl components: Documentation messages: 80048 nosy: georg.brandl, tjreedy severity: normal status: open title: 3.0 base64 doc examples lack bytes 'b' indicator _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4975> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com