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 arigo
Recipients arigo, brett.cannon, gregory.p.smith, larry, rhettinger, serhiy.storchaka, vstinner, yselivanov
Date 2017-01-10.09:16:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
(S6) 'xxx' % b'foo' == 'xxx'
     b'xxx' % b'foo' raises TypeError

The first case is because PyMapping_Check() is true on b'foo', so it works like 'xxx' % {...}, which always just returns 'xxx'.  The second case is because _PyBytes_Format() contains more special cases, for bytes and bytearray, which are not present in PyUnicode_Format().
History
Date User Action Args
2017-01-10 09:16:10arigosetrecipients: + arigo, brett.cannon, rhettinger, gregory.p.smith, vstinner, larry, serhiy.storchaka, yselivanov
2017-01-10 09:16:10arigosetmessageid: <[email protected]>
2017-01-10 09:16:10arigolinkissue28885 messages
2017-01-10 09:16:10arigocreate