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

gh-74453: Add stronger security warning to os.path.commonprefix#144401

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
encukou merged 3 commits intopython:mainfromsethmlarson:os-path-commonprefix
Feb 3, 2026
Merged
Changes fromall 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
12 changes: 7 additions & 5 deletionsDoc/library/os.path.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,15 +97,17 @@ the :mod:`glob` module.)

..function::commonprefix(list, /)

Return the longestpath prefix (taken character-by-character) that is a
prefix of allpaths in *list*. If *list* is empty, return the empty string
Return the longeststring prefix (taken character-by-character) that is a
prefix of allstrings in *list*. If *list* is empty, return the empty string
(``''``).

..note::
..warning::

This function may return invalid paths because it works a
character at a time. To obtain a valid path, see
:func:`commonpath`.
character at a time.
If you need a **common path prefix**, then the algorithm
implemented in this function is not secure. Use
:func:`commonpath` for finding a common path prefix.

::

Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp