Skip to content

os.path.samestat incorrectly states "Accepts a path-like object" #136682

@bluetech

Description

@bluetech

Documentation

Unless I am in some way confused, that statement is incorrect. The function only accepts stat objects.

cpython/Lib/genericpath.py

Lines 121 to 126 in 624bf52

# Are two stat buffers (obtained from stat, fstat or lstat)
# describing the same file?
def samestat(s1, s2):
"""Test whether two stat buffers reference the same file"""
return (s1.st_ino == s2.st_ino and
s1.st_dev == s2.st_dev)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions