Peter Otten <__pete...@web.de> writes: > Have a look at PyFile_WriteObject in Objects/fileobject.c. > As I understand the code it basically does > > if isinstance(obj) and stream.encoding is not None: > s = obj.encode(stream.encoding)) > else: > s = str(obj) > stream.write(s)
So as I understand it I'm looking for the hypothetical from __future__ import print_coerce_args_to_unicode and without that, I'm stuck with the hard-coded ‘str’ coercion. Thanks, at least now I can stop flailing to try to get it working. -- \ “Fear him, which after he hath killed hath power to cast into | `\ hell; yea, I say unto you, Fear him.” –Jesus, as quoted in Luke | _o__) 12:5 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list