diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index f5ddb426c915f5a..4825093ccfe6d12 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -415,7 +415,9 @@ the :mod:`glob` module.) Normalize the case of a pathname. On Windows, convert all characters in the pathname to lowercase, and also convert forward slashes to backward slashes. - On other operating systems, return the path unchanged. + On other operating systems (Posix), return String or Bytes converted from + Path-like Object + .. versionchanged:: 3.6 Accepts a :term:`path-like object`. diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 8025b063397a038..b1bf3f258a77f1d 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -52,7 +52,7 @@ def _get_sep(path): # (another function should be defined to do that). def normcase(s, /): - """Normalize case of pathname. Has no effect under Posix""" + """Normalize case of pathname. Normalizes path-like Objects into Str or Bytes """ return os.fspath(s) diff --git a/Misc/NEWS.d/next/Documentation/2026-10-29-18-57-38.gh-issue-160904.nyxAv_.rst b/Misc/NEWS.d/next/Documentation/2026-10-29-18-57-38.gh-issue-160904.nyxAv_.rst new file mode 100644 index 000000000000000..03dd3581b5fce45 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2026-10-29-18-57-38.gh-issue-160904.nyxAv_.rst @@ -0,0 +1 @@ +FiX: In Function os.path.normcase in Lib/posixpath.py docstring states path remains unchanged on POSIX Systems which is not true. Updated Docstring and documentation