[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ __

[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93ab72de7431 by Serhiy Storchaka in branch 'default': Issue #27474: Unified error messages in the __contains__ method of bytes and https://hg.python.org/cpython/rev/93ab72de7431 -- nosy: +python-dev ___ P

[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka stage: -> commit review ___ Python tracker ___ ___ Python

[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-09 Thread Xiang Zhang
New submission from Xiang Zhang: Now, `sys.maxsize+1 in b'foo'` raises "TypeError: 'int' does not support the buffer interface" which seems weird. In such case, I don't think there is any difference between sys.maxsize+1 and 256. So I suggest make it emits the same exceptions as `256 in b'foo'