STINNER Victor added the comment: 256 is not part of the range(0, 256): 0..255.
$ python >>> print(list(range(0,256))) [0, 1, 2, 3, ..., 253, 254, 255] It doesn't make sense to store the number 256 in a byte string. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21177> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com