Note that the single argument call requires a bytes object. If you pass a string object, you have to provide the encoding argument. I’m not sure if it’s completely clear in the page you referenced. If not, you could submit a bug report.
Oh, I see. I guess that’s implied by the source=b'' line, but it wasn’t clear to me. I don’t know if that could be made clear in the signature. Probably needs a comment like you just said: “the single argument call requires a bytes object.”
The doc says “constructor arguments are interpreted as for bytearray()” and the doc for that is directly above and says about source: 'If it is a string, you must also give the encoding".
True, since bytes objects are really immutable arrays of ints. I fooled myself looking at OP’s three examples where the first one explicitly showed a zero-length bytes literal as the argument. That kind of masked the nature of the argument’s type. (I don’t use bytes objects much.)