Hmm, the logic is not as I would expect it, but that's maybe just me.

I'd expect that if a stream is specified, that makes the value for `stdout` irrelevant, while you're doing it the other way around: both specifying a stream and setting stdout to `True` result in `sys.stdout`, not the stream.

Maybe add logic to raise an error when both `stream` and `stdout` are specified, so there are never any surprises/misinterpretations?