-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
def walk():
root = Path("src/")
for path in root.rglob("*"):
p = path.relative_to(root)
print(p)
print(p.is_dir()) # always returns False
print(path.is_dir()) # returns True when it's a dirSince path.relative_to() returns a Path it would be correct to either return True or False depending if it's a path (even if it's relative) or an "I_DONT_KNOW" response instead of True or False.
CPython versions tested on:
3.13
Operating systems tested on:
macOS Tahoe 26.0.1
Metadata
Metadata
Assignees
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error