Golf:
`steam = sys.stdout if stdout is True else sys.stderr`