
May 27, 2011
1:34 a.m.
Masklinn wrote:
would it make more sense to be able to create "byte patterns", with formats similar to those of str.format but not identical (e.g. better control on layout would be nice, something similar to Erlang's bit syntax for putting binaries together).
Sounds a lot like struct.pack. Maybe struct.pack and struct.unpack could be made available as methods of bytes? I don't think this would address the OP's use case, though, because he seems to actually want a textual format whose output is encoded in ascii. -- Greg