On Tue, May 17, 2011 at 2:20 PM, Ethan Furman <et...@stoneleaf.us> wrote: > The big question, though, is would you do it this way: > > some_var = bytes(23).replace(b'\x00', b'a') > > or this way? > > some_var = bytes(b'a' * 23)
Actually, I would just do it this way: some_var = b'a' * 23 That's already a bytes object. Passing it into the constructor is redundant. -- http://mail.python.org/mailman/listinfo/python-list