[issue4975] 3.0 base64 doc examples lack bytes 'b' indicator
Terry J. Reedy
report at bugs.python.org
Sat Jan 17 22:33:01 CET 2009
New submission from Terry J. Reedy <tjreedy at 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 <report at bugs.python.org>
<http://bugs.python.org/issue4975>
_______________________________________
More information about the Python-bugs-list
mailing list