8000 bpo-30974: fix os.path.samefile docstring with docs by timofurrer · Pull Request #7337 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-30974: fix os.path.samefile docstring with docs #7337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-30974: fix os.path.samefile docstring with docs
  • Loading branch information
timofurrer committed Jun 2, 2018
commit ba7a9f57a5e9bd4dc235b6258f30ca94326c0c25
6 changes: 5 additions & 1 deletion Lib/genericpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ def samestat(s1, s2):

# Are two filenames really pointing to the same file?
def samefile(f1, f2):
"""Test whether two pathnames reference the same actual file"""
"""Test whether two pathnames reference the same actual file or directory

This is determined by the device number and i-node number and
raises an exception if an os.stat() call on either pathname fails.
"""
s1 = os.stat(f1)
s2 = os.stat(f2)
return samestat(s1, s2)
Expand Down
0