Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improvepathlib.Path.iterdir docstring #98832

Closed
Assignees
sobolevn
Labels
stdlibStandard Library Python modules in the Lib/ directorytopic-pathlib
@sobolevn

Description

@sobolevn

Right now it says:

cpython/Lib/pathlib.py

Lines 871 to 876 ine089f23

defiterdir(self):
"""Iterate over the files in this directory. Does not yield any
result for the special paths '.' and '..'.
"""
fornameinos.listdir(self):
yieldself._make_child_relpath(name)

This part is confusing:

Does not yield any result for the special paths '.' and '..'

It might be understood asPath('.').iterdir() not yileding any results.

I think, that it would be better to use the exact same wording as in docs:https://docs.python.org/3/library/pathlib.html#pathlib.Path.iterdir

the special entries '.' and '..' are not included.

I will send a PR.

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytopic-pathlib

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp