Terry J. Reedy added the comment:
In 3.3+, somestring.encode('ascii') is a small constant-time operation. So for
pure ascii *text* bytes, that seems the appropriate 3.x approach.
I agree that something else should be used for binary formatting. Perhaps
struct.pack could be extended to work with variable-length data the way I
thought it already did. Otherwise, it already *is* the binary formatting method.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue3982>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com