Bill McClain wrote:
On 2008-12-09, Peter Otten <[EMAIL PROTECTED]> wrote:
out = io.StringIO()
print(u"hello", file=out, end=u"\n")
out.getvalue()
u'hello\n'
That has the benefit of working. Thank you!
That can't be the intended behavior of print(), can it? Insering non-unicode
spaces and line terminators? I thought all text was unicode now. Or is that
only in 3.0?
In Python 2.x unmarked string literals are bytestrings. In Python 3.x
they're Unicode. The intention is to make the transition from 2.x to 3.x
easier by adding some features of 3.x to 2.x, but without breaking
backwards compatibility (not entirely successfully!).
--
http://mail.python.org/mailman/listinfo/python-list