Konstantin Zemlyak added the comment: To clarify few things:
- Yes, I know that 256 doesn't fit into byte. I was checking how bytes/bytearray are handling overflow. - I know that range() is a half-open interval. Yet this error message still gave me a "wtf" moment because I didn't realize it was talking about python's range() builtin and not about mathematical term. So even though this message is technically 100% correct it still doesn't feel right. May I propose a message "byte must be in range [0-255]" instead? This won't be confused with either python's range() nor [] list notation. ---------- _______________________________________ 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