Antoine Pitrou added the comment:

Well, but eval works if you put parentheses as required by the grammar:

>>> s = "(b'xy'\nb'za')"
>>> eval(s)
b'xyza'

Yes, _str_parts and _bytes_parts should probably remain separate. It's the 
higher-level routine that would deserve sharing.
Also, perhaps the other wrapping routines (for dict, list...) could get the 
same treatment.

----------

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

Reply via email to