Author tjollans
Recipients belopolsky, pitrou, terry.reedy, tjollans, vstinner
Date 2010-06-21.20:09:49
SpamBayes Score 0.00278079
Marked as misclassified No
Message-id <>
Thanks for the input. I'm going to re-work the patch a bit (releasing buffers and such) and add a test within the next few days. 

The question remains whether or not to accept other buffers with itemsize == 1. The way I understand it, fromstring already accepted any read-only buffer object, no matter the item size / whether it actually makes sense to call it a "string". I don't think accepting a hypothetical read-only buffer with items wider than 1 in fromstring (yes, bad naming) is desirable behaviour - I see a few options on how to deal with input validation:

1. ignore the item size. This'd be similar to current behaviour, plus r/w buffers

2. only accept byte-based buffers. ("things that look like 'const char*'") - this is what I've been aiming at.

3. only accept bytes and bytearray, and let the user think about how to deal with other objects. Question is - shouldn't array('B') be treated like bytearray in this respect?
Date User Action Args
2010-06-21 20:09:51tjollanssetrecipients: + tjollans, terry.reedy, belopolsky, pitrou, vstinner
2010-06-21 20:09:51tjollanssetmessageid: <>
2010-06-21 20:09:50tjollanslinkissue8990 messages
2010-06-21 20:09:49tjollanscreate