Python 2 ‘print’, coercing arguments to Unicode

Ben Finney ben+python at benfinney.id.au
Tue Oct 6 17:23:17 EDT 2015


Laura Creighton <lac at openend.se> writes:

> Hmm, now that I read the six document again
>  @six.python_2_unicode_compatible


Peter Otten <__peter__ at web.de> writes:

> I don't think this is possible with the print statement, but the
> print() function can be replaced with anything you like:


Hmm. I am more looking for something that doesn't involve replacing
‘print’, but rather to hook into whatever it uses to coerce the type of
its arguments.

-- 
 \        “The problem with television is that the people must sit and |
  `\    keep their eyes glued on a screen: the average American family |
_o__)                 hasn't time for it.” —_The New York Times_, 1939 |
Ben Finney




More information about the Python-list mailing list