Skip to content

Conversation

@andersk
Copy link
Contributor

@andersk andersk commented Nov 22, 2016

Allows this example from the Python documentation to type check:

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", end="")
    if tarinfo.isreg():
        print("a regular file.")
    elif tarinfo.isdir():
        print("a directory.")
    else:
        print("something else.")
tar.close()

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@JukkaL
Copy link
Contributor

JukkaL commented Nov 23, 2016

Thanks!

@JukkaL JukkaL merged commit e13f2c7 into python:master Nov 23, 2016
sharmaeklavya2 added a commit to sharmaeklavya2/zulip that referenced this pull request May 24, 2017
sharmaeklavya2 added a commit to sharmaeklavya2/zulip that referenced this pull request May 24, 2017
timabbott pushed a commit to zulip/zulip that referenced this pull request May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants