Serhiy Storchaka added the comment:

Another option is to use the bytes object as internal buffer. If its refcount 
is == 1 (normal case), it is modified in-place, otherwise (if the reference is 
saved outside) new bytes object is created.

----------

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

Reply via email to