[issue4205] unexpected str.__init__() behaviour on b''
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 Core, Unicode messages: 75220 nosy: keldonin severity: normal status: open title: unexpected str.__init__() behaviour on b'' type: behavior versions: Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4205 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4205] unexpected str.__init__() behaviour on b''
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] http://bugs.python.org/issue4205 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4205] unexpected str.__init__() behaviour on b''
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com