New submission from Eric Devolder [EMAIL PROTECTED]:
creating a unicode string from an empty b'' does not result in '', but
produces b'' instead.
str(b'')
b''
Workaround: if the encoding is specified, the resulting string is fine.
str(b'', 'ascii')
''
--
components: Interpreter
Benjamin Peterson [EMAIL PROTECTED] added the comment:
This is expected. There is no bytes.__str__ method, so the
bytes.__repr__ is used.
--
nosy: +benjamin.peterson
resolution: - invalid
status: open - closed
___
Python tracker [EMAIL PROTECTED]
Eric Devolder [EMAIL PROTECTED] added the comment:
Thanks for the tip - and sorry about the noise. I didn't catch this when
reading through PEPs manual, however.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4205