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 santoso.wijaya
Recipients OscarL, benjamin.peterson, pitrou, santoso.wijaya
Date 2011-06-16.20:13:07
SpamBayes Score 1.05394e-06
Marked as misclassified No
Message-id <1308255188.85.0.634689956595.issue12340@psf.upfronthosting.co.za>
In-reply-to
Content
As for the "<memory at %p>" string, when _io.BufferedWriter prepares the byte buffer into a PyMemoryView wrapper and passes it into the raw IO object:

    res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_write, memobj, NULL);

For some reason, memobj.__repr__ is called before being passed to the raw IO's write method.

I can't reproduce this odd behavior using a dumb raw IO that extends _io.RawIOBase. Mimicking what pyserial does, however, reproduces both issues (see attached).
History
Date User Action Args
2011-06-16 20:13:08santoso.wijayasetrecipients: + santoso.wijaya, pitrou, benjamin.peterson, OscarL
2011-06-16 20:13:08santoso.wijayasetmessageid: <1308255188.85.0.634689956595.issue12340@psf.upfronthosting.co.za>
2011-06-16 20:13:08santoso.wijayalinkissue12340 messages
2011-06-16 20:13:08santoso.wijayacreate