]> granicus.if.org Git - python/commitdiff
#1096310: document usage of sys.__std*__ a bit better.
authorGeorg Brandl <georg@python.org>
Tue, 31 Mar 2009 19:10:35 +0000 (19:10 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 31 Mar 2009 19:10:35 +0000 (19:10 +0000)
Doc/library/sys.rst

index 30555c824b4c7aa5ae6b9b0bc0692894c4d270e5..6d02109e37e395a3384cb45e0d77b2c43d626e66 100644 (file)
@@ -871,9 +871,14 @@ always available.
           __stderr__
 
    These objects contain the original values of ``stdin``, ``stderr`` and
-   ``stdout`` at the start of the program.  They are used during finalization, and
-   could be useful to restore the actual files to known working file objects in
-   case they have been overwritten with a broken object.
+   ``stdout`` at the start of the program.  They are used during finalization,
+   and could be useful to print to the actual standard stream no matter if the
+   ``sys.std*`` object has been redirected.
+
+   It can also be used to restore the actual files to known working file objects
+   in case they have been overwritten with a broken object.  However, the
+   preferred way to do this is to explicitly save the previous stream before
+   replacing it, and restore the saved object.
 
 
 .. data:: tracebacklimit