Serhiy Storchaka added the comment: After changing the type of Struct.format to str we perhaps should deprecate accepting bytes as format. Currently this can lead to emitting a BytesWarning.
$ ./python -Wa -b >>> import struct >>> struct.pack('I', 12345) b'90\x00\x00' >>> struct.pack(b'I', 12345) __main__:1: BytesWarning: Comparison between bytes and string __main__:1: BytesWarning: Comparison between bytes and string b'90\x00\x00' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21071> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com