saving_stdout -> redirecting_stdout (Phillip Eby).

This commit is contained in:
Guido van Rossum 2005-05-03 17:21:13 +00:00
parent 944216964a
commit b96d41a65f
1 changed files with 2 additions and 2 deletions

View File

@ -581,7 +581,7 @@ Examples
7. Redirect stdout temporarily:
def saving_stdout(new_stdout):
def redirecting_stdout(new_stdout):
save_stdout = sys.stdout
try:
sys.stdout = new_stdout
@ -592,7 +592,7 @@ Examples
Used as follows:
block opening(filename, "w") as f:
block saving_stdout(f):
block redirecting_stdout(f):
print "Hello world"
Acknowledgements