[issue4205] unexpected str.__init__() behaviour on b''

2008-10-25 Thread Eric Devolder
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]>

[issue4205] unexpected str.__init__() behaviour on b''

2008-10-25 Thread Benjamin Peterson
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

[issue4205] unexpected str.__init__() behaviour on b''

2008-10-25 Thread Eric Devolder
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: Inter