sbt <shibt...@gmail.com> added the comment:

> 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.'

----------
nosy: +sbt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13505>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to