@@ -266,7 +266,7 @@ Accessing individual parts
266
266
To access the individual "parts" (components) of a path, use the following
267
267
property:
268
268
269
- .. data :: PurePath.parts
269
+ .. attribute :: PurePath.parts
270
270
271
271
A tuple giving access to the path's various components::
272
272
@@ -290,7 +290,7 @@ Methods and properties
290
290
291
291
Pure paths provide the following methods and properties:
292
292
293
- .. data :: PurePath.drive
293
+ .. attribute :: PurePath.drive
294
294
295
295
A string representing the drive letter or name, if any::
296
296
@@ -306,7 +306,7 @@ Pure paths provide the following methods and properties:
306
306
>>> PureWindowsPath('//host/share/foo.txt').drive
307
307
'\\\\host\\share'
308
308
309
- .. data :: PurePath.root
309
+ .. attribute :: PurePath.root
310
310
311
311
A string representing the (local or global) root, if any::
312
312
@@ -342,7 +342,7 @@ Pure paths provide the following methods and properties:
342
342
an implementation-defined manner, although more than two leading slashes
343
343
shall be treated as a single slash." *
344
344
345
- .. data :: PurePath.anchor
345
+ .. attribute :: PurePath.anchor
346
346
347
347
The concatenation of the drive and root::
348
348
@@ -356,7 +356,7 @@ Pure paths provide the following methods and properties:
356
356
'\\\\host\\share\\'
357
357
358
358
359
- .. data :: PurePath.parents
359
+ .. attribute :: PurePath.parents
360
360
361
361
An immutable sequence providing access to the logical ancestors of
362
362
the path::
@@ -372,7 +372,7 @@ Pure paths provide the following methods and properties:
372
372
.. versionchanged :: 3.10
373
373
The parents sequence now supports :term: `slices <slice> ` and negative index values.
374
374
375
- .. data :: PurePath.parent
375
+ .. attribute :: PurePath.parent
376
376
377
377
The logical parent of the path::
378
378
@@ -401,7 +401,7 @@ Pure paths provide the following methods and properties:
401
401
symlinks and eliminate `".." ` components.
402
402
403
403
404
- .. data :: PurePath.name
404
+ .. attribute :: PurePath.name
405
405
406
406
A string representing the final path component, excluding the drive and
407
407
root, if any::
@@ -417,7 +417,7 @@ Pure paths provide the following methods and properties:
417
417
''
418
418
419
419
420
- .. data :: PurePath.suffix
420
+ .. attribute :: PurePath.suffix
421
421
422
422
The file extension of the final component, if any::
423
423
@@ -429,7 +429,7 @@ Pure paths provide the following methods and properties:
429
429
''
430
430
431
431
432
- .. data :: PurePath.suffixes
432
+ .. attribute :: PurePath.suffixes
433
433
434
434
A list of the path's file extensions::
435
435
@@ -441,7 +441,7 @@ Pure paths provide the following methods and properties:
441
441
[]
442
442
443
443
444
- .. data :: PurePath.stem
444
+ .. attribute :: PurePath.stem
445
445
446
446
The final path component, without its suffix::
447
447
@@ -1304,11 +1304,11 @@ Below is a table mapping various :mod:`os` functions to their corresponding
1304
1304
:meth: `Path.group `
1305
1305
:func: `os.path.isabs ` :meth: `PurePath.is_absolute `
1306
1306
:func: `os.path.join ` :func: `PurePath.joinpath `
1307
- :func: `os.path.basename ` :data : `PurePath.name `
1308
- :func: `os.path.dirname ` :data : `PurePath.parent `
1307
+ :func: `os.path.basename ` :attr : `PurePath.name `
1308
+ :func: `os.path.dirname ` :attr : `PurePath.parent `
1309
1309
:func: `os.path.samefile ` :meth: `Path.samefile `
1310
- :func: `os.path.splitext ` :data : `PurePath.stem ` and
1311
- :data : `PurePath.suffix `
1310
+ :func: `os.path.splitext ` :attr : `PurePath.stem ` and
1311
+ :attr : `PurePath.suffix `
1312
1312
==================================== ==============================
1313
1313
1314
1314
.. rubric :: Footnotes
0 commit comments