Марк Коренберг added the comment: I think, we should deny:
* Passing `0` to `to_bytes` (even if integer is equal to zero) * Passing empty string to `from_bytes` I do not see any use cases for this to work. It was never guaranteed to work earlier. Everyone pass constant to `to_bytes` that is > 0. And passing empty buffer to `from_bytes` just indicate error in logic (i.e. something was not read correctly from file/socket e.t.c). `struct.pack`/`unpack` does not support zero-byte types. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27623> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com