summaryrefslogtreecommitdiffstats
path: root/Doc/library/tarfile.rst
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-09-01 23:34:30 (GMT)
committerCollin Winter <collinw@gmail.com>2007-09-01 23:34:30 (GMT)
commitc79461b1648c9209c3652184572a17eef0a76202 (patch)
tree47c6238c8c47c4881f6f0523ea86d201cea1fc94 /Doc/library/tarfile.rst
parent2ac012130549b1ef51ebce11148d01eaca1a7033 (diff)
downloadcpython-c79461b1648c9209c3652184572a17eef0a76202.zip
cpython-c79461b1648c9209c3652184572a17eef0a76202.tar.gz
cpython-c79461b1648c9209c3652184572a17eef0a76202.tar.bz2
Partial py3k-ification of Doc/library/: convert has_key references into either 'k in d' or __contains__; normalize raise statements; convert print statements into print function calls.
Diffstat (limited to 'Doc/library/tarfile.rst')
-rw-r--r--Doc/library/tarfile.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index dcd62a0..4aabd81 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -601,13 +601,13 @@ How to read a gzip compressed tar archive and display some member information::
import tarfile
tar = tarfile.open("sample.tar.gz", "r:gz")
for tarinfo in tar:
- print tarinfo.name, "is", tarinfo.size, "bytes in size and is",
+ print(tarinfo.name, "is", tarinfo.size, "bytes in size and is", end="")
if tarinfo.isreg():
- print "a regular file."
+ print("a regular file.")
elif tarinfo.isdir():
- print "a directory."
+ print("a directory.")
else:
- print "something else."
+ print("something else.")
tar.close()
How to create a tar archive with faked information::