Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
Attached is a script to find all of the mismatches between the C and Python implementations. There are several. Below is the output: RawIOBase C is missing: ['readinto', 'write'] StringIO C is missing: ['name'] StringIO python is missing: ['__getstate__', '__setstate__'] BufferedRandom python is missing: ['raw'] BlockingIOError python is missing: ['characters_written'] TextIOWrapper python is missing: ['buffer'] BufferedReader python is missing: ['raw'] BufferedWriter python is missing: ['raw'] BytesIO python is missing: ['__setstate__'] Since the Python version was the original reference implementation, adding the attributes missing from the C side seems to be a straightforward decision (and it should simply match whatever the Python version does). It looks like a number of new attributes have creeped into the C side, which will require more thoughtful decision making. We should probably double-check that each of these is documented, while we're at it. ---------- priority: low -> normal resolution: -> accepted title: RawIOBase doesn't define readinto -> Python and C implementations of io are out of sync Added file: http://bugs.python.org/file18889/missing_methods.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9858> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com