Skip to content

Commit 4a8f892

Browse files
committed
Move OSError note before audit-event per review
1 parent 3662864 commit 4a8f892

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Doc/library/pathlib.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,11 +1339,6 @@ Reading directories
13391339
The paths are returned in no particular order.
13401340
If you need a specific order, sort the results.
13411341

1342-
.. note::
1343-
Any :exc:`OSError` exceptions raised from scanning the filesystem are
1344-
suppressed. This includes :exc:`PermissionError` when accessing
1345-
directories without read permission.
1346-
13471342
.. seealso::
13481343
:ref:`pathlib-pattern-language` documentation.
13491344

@@ -1356,6 +1351,11 @@ Reading directories
13561351
``False``, this method follows symlinks except when expanding "``**``"
13571352
wildcards. Set *recurse_symlinks* to ``True`` to always follow symlinks.
13581353

1354+
.. note::
1355+
Any :exc:`OSError` exceptions raised from scanning the filesystem are
1356+
suppressed. This includes :exc:`PermissionError` when accessing
1357+
directories without read permission.
1358+
13591359
.. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
13601360

13611361
.. versionchanged:: 3.12
@@ -1382,14 +1382,14 @@ Reading directories
13821382
The paths are returned in no particular order.
13831383
If you need a specific order, sort the results.
13841384

1385+
.. seealso::
1386+
:ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation.
1387+
13851388
.. note::
13861389
Any :exc:`OSError` exceptions raised from scanning the filesystem are
13871390
suppressed. This includes :exc:`PermissionError` when accessing
13881391
directories without read permission.
13891392

1390-
.. seealso::
1391-
:ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation.
1392-
13931393
.. audit-event:: pathlib.Path.rglob self,pattern pathlib.Path.rglob
13941394

13951395
.. versionchanged:: 3.12

0 commit comments

Comments
 (0)