[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

Oren Milman report at bugs.python.org
Wed Mar 8 05:05:44 EST 2017


Oren Milman added the comment:

I wrote a patch, but I attach it here and not in a PR, as you haven't approved
adding tests. (I would be happy to open a PR with or without the tests.)
I ran the test module (on my Windows 10), and seems like the patch doesn't
break anything.

also, while running test_memoryio with my added tests, i noticed some places in
Lib/_pyio.py which seemed like they should be changed.
in particular, I changed 'var.__index__' to 'var = var.__index__()' in some
places.
I feel really uncomfortable about that change, as it undos a change committed
by Florent Xicluna in b14930cd93e74cae3b7370262c6dcc7c28e0e712.
Florent, what was the reason for that change?

----------
keywords: +patch
nosy: +flox
Added file: http://bugs.python.org/file46709/patchDraft1.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29741>
_______________________________________


More information about the Python-bugs-list mailing list