Skip to content

Commit b5428bb

Browse files
authored
gh-136437: Document some os.path functions as requiring pos-only (#136812)
1 parent a109606 commit b5428bb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Doc/library/os.path.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ the :mod:`glob` module.)
6464
Accepts a :term:`path-like object`.
6565

6666

67-
.. function:: basename(path)
67+
.. function:: basename(path, /)
6868

6969
Return the base name of pathname *path*. This is the second element of the
7070
pair returned by passing *path* to the function :func:`split`. Note that
@@ -237,7 +237,7 @@ the :mod:`glob` module.)
237237
Accepts a :term:`path-like object`.
238238

239239

240-
.. function:: isabs(path)
240+
.. function:: isabs(path, /)
241241

242242
Return ``True`` if *path* is an absolute pathname. On Unix, that means it
243243
begins with a slash, on Windows that it begins with two (back)slashes, or a
@@ -261,7 +261,7 @@ the :mod:`glob` module.)
261261
Accepts a :term:`path-like object`.
262262

263263

264-
.. function:: isdir(path)
264+
.. function:: isdir(path, /)
265265

266266
Return ``True`` if *path* is an :func:`existing <exists>` directory. This
267267
follows symbolic links, so both :func:`islink` and :func:`isdir` can be true
@@ -372,7 +372,7 @@ the :mod:`glob` module.)
372372
Accepts a :term:`path-like object` for *path* and *paths*.
373373

374374

375-
.. function:: normcase(path)
375+
.. function:: normcase(path, /)
376376

377377
Normalize the case of a pathname. On Windows, convert all characters in the
378378
pathname to lowercase, and also convert forward slashes to backward slashes.
@@ -509,7 +509,7 @@ the :mod:`glob` module.)
509509
Added Windows support.
510510

511511

512-
.. function:: split(path)
512+
.. function:: split(path, /)
513513

514514
Split the pathname *path* into a pair, ``(head, tail)`` where *tail* is the
515515
last pathname component and *head* is everything leading up to that. The
@@ -525,7 +525,7 @@ the :mod:`glob` module.)
525525
Accepts a :term:`path-like object`.
526526

527527

528-
.. function:: splitdrive(path)
528+
.. function:: splitdrive(path, /)
529529

530530
Split the pathname *path* into a pair ``(drive, tail)`` where *drive* is either
531531
a mount point or the empty string. On systems which do not use drive
@@ -550,7 +550,7 @@ the :mod:`glob` module.)
550550
Accepts a :term:`path-like object`.
551551

552552

553-
.. function:: splitroot(path)
553+
.. function:: splitroot(path, /)
554554

555555
Split the pathname *path* into a 3-item tuple ``(drive, root, tail)`` where
556556
*drive* is a device name or mount point, *root* is a string of separators
@@ -583,7 +583,7 @@ the :mod:`glob` module.)
583583
.. versionadded:: 3.12
584584

585585

586-
.. function:: splitext(path)
586+
.. function:: splitext(path, /)
587587

588588
Split the pathname *path* into a pair ``(root, ext)`` such that ``root + ext ==
589589
path``, and the extension, *ext*, is empty or begins with a period and contains at

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy