[docs] [issue20686] Confusing statement

R. David Murray report at bugs.python.org
Thu Feb 20 15:22:26 CET 2014

R. David Murray added the comment:

Thanks, yes, Georg already pointed out the issue with print.  I suppose that this is something that changed at some point in Python2's history but this bit of the docs was not updated.

Python can write anything to a file, you just have to tell it what encoding to use, either by explicitly encoding the unicode to binary before writing it to the file, or by using codecs.open and specifying an encoding for the file.  (This is all much easier in python3, where the unicode support is part of the core of the language.)

versions: +Python 2.7

Python tracker <report at bugs.python.org>

More information about the docs mailing list