This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients georg.brandl, terry.reedy
Date 2009-01-17.21:32:59
SpamBayes Score 6.0671476e-07
Marked as misclassified No
Message-id <1232227980.99.0.219231642791.issue4975@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-01-17 21:33:01terry.reedysetrecipients: + terry.reedy, georg.brandl
2009-01-17 21:33:00terry.reedysetmessageid: <1232227980.99.0.219231642791.issue4975@psf.upfronthosting.co.za>
2009-01-17 21:33:00terry.reedylinkissue4975 messages
2009-01-17 21:32:59terry.reedycreate