Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(32647)

Unified Diff: Doc/library/functions.rst

Issue 12832: The documentation for the print function should explain/point to how to control the sys.stdout encoding
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/functions.rst Wed Nov 30 00:25:06 2011 +0200
+++ b/Doc/library/functions.rst Tue Nov 29 22:56:20 2011 -0500
@@ -961,6 +961,12 @@
The *file* argument must be an object with a ``write(string)`` method; if it
is not present or ``None``, :data:`sys.stdout` will be used.
+ The default encoding used for the various system streams (:data:`sys.stdin`,
+ :data:`sys.stdout`, :data:`sys.stderr`) is set to the value of
+ :envvar:`PYTHONIOENCODING` if defined, or if it isn't defined it is retrieved from
+ the standard stream via :func:`os.device_encoding` or :func:`locale.getpreferredencoding`.
+
+ If the above fails the encoding defaults to ASCII.
.. function:: property(fget=None, fset=None, fdel=None, doc=None)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+