Serhiy Storchaka added the comment: Better way is data = data.cast('B'). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue23688> _______________________________________