This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients xiang.zhang
Date 2016-07-06.10:38:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467801528.33.0.514121242609.issue27460@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-07-06 10:38:48xiang.zhangsetrecipients: + xiang.zhang
2016-07-06 10:38:48xiang.zhangsetmessageid: <1467801528.33.0.514121242609.issue27460@psf.upfronthosting.co.za>
2016-07-06 10:38:48xiang.zhanglinkissue27460 messages
2016-07-06 10:38:47xiang.zhangcreate