Skip to content

gh-61745: Clarify os.listdir behavior for empty path#145338

Open
u-wlkjyy wants to merge 1 commit intopython:mainfrom
u-wlkjyy:fix-61745-listdir-empty-path
Open

gh-61745: Clarify os.listdir behavior for empty path#145338
u-wlkjyy wants to merge 1 commit intopython:mainfrom
u-wlkjyy:fix-61745-listdir-empty-path

Conversation

@u-wlkjyy
Copy link

@u-wlkjyy u-wlkjyy commented Feb 28, 2026

Fixes gh-61745.

Clarify the os.listdir() docs to explicitly state that passing an empty
string ('') raises FileNotFoundError, and that '.' should be used
for the current directory.

This change updates documentation only.


📚 Documentation preview 📚: https://cpython-previews--145338.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Feb 28, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[doc] os.listdir and os.path.join inconsistent on empty path

1 participant