mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix spacing in docs for tarfile (GH-20629)
Before ``` content.txt is 42 bytes in size and isa regular file. folder is 420 bytes in size and isa directory. magic is 4200 bytes in size and issomething else. ``` After: ``` content.txt is 42 bytes in size and is a regular file. folder is 420 bytes in size and is a directory. magic is 4200 bytes in size and is something else. ``` Automerge-Triggered-By: @orsenthil
This commit is contained in:
parent
232dda6cbc
commit
7a280197f4
1 changed files with 1 additions and 1 deletions
|
@ -787,7 +787,7 @@ How to read a gzip compressed tar archive and display some member information::
|
||||||
import tarfile
|
import tarfile
|
||||||
tar = tarfile.open("sample.tar.gz", "r:gz")
|
tar = tarfile.open("sample.tar.gz", "r:gz")
|
||||||
for tarinfo in tar:
|
for tarinfo in tar:
|
||||||
print(tarinfo.name, "is", tarinfo.size, "bytes in size and is", end="")
|
print(tarinfo.name, "is", tarinfo.size, "bytes in size and is ", end="")
|
||||||
if tarinfo.isreg():
|
if tarinfo.isreg():
|
||||||
print("a regular file.")
|
print("a regular file.")
|
||||||
elif tarinfo.isdir():
|
elif tarinfo.isdir():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue