Message148911
| Author |
sbt |
| Recipients |
alexandre.vassalotti, irmen, meador.inge, pitrou, sbt |
| Date |
2011年12月06日.12:25:46 |
| SpamBayes Score |
2.2494708e-06 |
| Marked as misclassified |
No |
| Message-id |
<1323174347.71.0.565108110534.issue13505@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> One *dirty* trick I am thinking about would be to use something like
> array.tostring() to construct the byte string.
array('B', ...) objects are pickled using two bytes per character, so there would be no advantage:
>>> pickle.dumps(array.array('B', b"hello"), 2)
b'\x80\x02carray\narray\nq\x00X\x01\x00\x00\x00Bq\x01]q\x02(KhKeKlKlKoe\x86q\x03Rq\x04.' |
|