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 docs@python, terry.reedy
Date 2011-06-28.19:22:57
SpamBayes Score 8.667966e-10
Marked as misclassified No
Message-id <1309288978.39.0.732754105333.issue12434@psf.upfronthosting.co.za>
In-reply-to
Content
Trying 3.2 code with 2.7, I got this (greatly simplified):

from __future__ import print_function
from io import StringIO
print('hello world', file=StringIO())
Traceback...
TypeError: string argument expected, got 'str'
(StringIO.StringIO works fine, of course.)

This was initially confusing. Suggestion: after

"Note Since this module has been designed primarily for Python 3.x, you have to be aware that all uses of “bytes” in this document refer to the str type (of which bytes is an alias), and all uses of “text” refer to the unicode type. "
add
'String' in exception messages may also mean the unicode type."
History
Date User Action Args
2011-06-28 19:22:58terry.reedysetrecipients: + terry.reedy, docs@python
2011-06-28 19:22:58terry.reedysetmessageid: <1309288978.39.0.732754105333.issue12434@psf.upfronthosting.co.za>
2011-06-28 19:22:57terry.reedylinkissue12434 messages
2011-06-28 19:22:57terry.reedycreate