New submission from Xiang Zhang:

I suggest change `bytes` exception message when an iterable containing overflow 
integers.

Right now, bytes([sys.maxsize+1]) emits ValueError: cannot fit 'int' into an 
index-sized integer "ValueError: cannot fit 'int' into an index-sized integer". 
I think actually when use bytes in such a situation we don't care the integer 
overflows or not, we only care if the integer is in range(0, 256) or not, just 
like what bytearray([sys.maxsize+1]) does.

----------
files: bytes_exception_msg.patch
keywords: patch
messages: 269879
nosy: xiang.zhang
priority: normal
severity: normal
status: open
title: Change bytes exception when overflow
Added file: http://bugs.python.org/file43637/bytes_exception_msg.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27460>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to