Message141118
> The solution could be global, to allow bytearray fit the 'c' format of
> PyArg_ParseTuple. Then one would also be able to pass a bytearray into
> other stringlib methods requiring the 'c' format.
Another possibility would be the change the 'c' format so that it accepts any object that supports the buffer protocol and whose buffer length is 1.
Attaching two patches: The first allows bytes and bytearray, the second allows any object that supports the buffer protocol. |
|
Date |
User |
Action |
Args |
2011-07-25 19:50:15 | petri.lehtinen | set | recipients:
+ petri.lehtinen, rhettinger, terry.reedy, ncoghlan, pitrou, vstinner, r.david.murray, eli.bendersky, docs@python, py.user |
2011-07-25 19:50:15 | petri.lehtinen | set | messageid: <1311623415.39.0.733166391662.issue12380@psf.upfronthosting.co.za> |
2011-07-25 19:50:14 | petri.lehtinen | link | issue12380 messages |
2011-07-25 19:50:14 | petri.lehtinen | create | |
|