Author josh.r
Recipients josh.r
Date 2018-03-05.21:29:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To be clear, this is a problem with old-style (printf-style) formatting, and applies to both bytes formatting and str formatting. So a class like:

    class Foo:
        def __index__(self):
            return 1

will fail with a TypeError should you do any of:

    '%o' % Foo()
    '%x' % Foo()
    '%X' % Foo()
    b'%o' % Foo()
    b'%x' % Foo()
    b'%X' % Foo()

even though hex(Foo()) and oct(Foo()) work without issue.
Date User Action Args
2018-03-05 21:29:44josh.rsetrecipients: + josh.r
2018-03-05 21:29:44josh.rsetmessageid: <>
2018-03-05 21:29:44josh.rlinkissue33002 messages
2018-03-05 21:29:44josh.rcreate