> Looks to me like there was already a reasonable way of getting a bytes > object containing a variable number of zero bytes. Any particular > reason why bytes(n) was given this specialised meaning?
I think it was because bytes() was originally mutable, and you need a way to create a buffer of n bytes. Now that bytes() ended up immutable (and bytearray was added), it's perhaps not so useful anymore. Of course, it would be confusing if bytes(4) created a sequence of one byte, yet bytearray(4) created four bytes. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list