IMO it makes almost no sense that QRCode.terminal() returns a string.
The string is in almost all cases printed anyway.
Changing the behaviour would break backward compatibility, though.
Options:
Change terminal() in a backward incompatible way
Introduce another method like "term()" which utilizes sys.stdout, deprecate and finally remove terminal()
The latter may be cleaner since the user gets a warning and it allows to remove the module_color and background arguments which have a dubious use, too
IMO it makes almost no sense that QRCode.terminal() returns a string. The string is in almost all cases printed anyway.
Changing the behaviour would break backward compatibility, though.
Options:
sys.stdout
, deprecate and finally remove terminal()The latter may be cleaner since the user gets a warning and it allows to remove the
module_color
andbackground
arguments which have a dubious use, too