Could somebody explain the general purpose of the bytes type in Python 3, or give some examples where it is preferred over other data types?
I see that the advantage of bytearrays over strings is their mutability, but what about bytes? So far, the only situation where I actually needed it was sending and receiving data through sockets; is there something else?