Steven D'Aprano added the comment: This is not a bug, since %b is not supported in Python 2, only in Python 3:
https://docs.python.org/2/library/stdtypes.html#string-formatting-operations No new features will be added to 2.7, so if you need %b you can use Python 3, or in Python 2.7 you can use the newer string format method instead: py> "{:b}".format(42) '101010' ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24112> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com