Message148904
I think we are kind of stuck here. I might need to rely on some clever hack to generate the desired str object in 2.7 without breaking the bytes support in 3.3 and without changing 2.7 itself.
One *dirty* trick I am thinking about would be to use something like array.tostring() to construct the byte string.
from array import array
class bytes:
def __reduce__(self):
return (array.tostring, (array('B', self),))
Of course, this doesn't work because pickle doesn't method pickling. But, maybe someone can figure out a way around this... I don't know.
Also, this is a bit annoying to fix since we changed the semantic meaning of the STRING opcodes in 3.x---i.e., it now represents a unicode string instead of a byte string. |
|
Date |
User |
Action |
Args |
2011-12-06 03:17:22 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti, irmen, pitrou, meador.inge |
2011-12-06 03:17:22 | alexandre.vassalotti | set | messageid: <1323141442.4.0.137143878614.issue13505@psf.upfronthosting.co.za> |
2011-12-06 03:17:21 | alexandre.vassalotti | link | issue13505 messages |
2011-12-06 03:17:21 | alexandre.vassalotti | create | |
|