This function may return duplicate path names if *pathname*
contains multiple "``**``" patterns and *recursive* is true.
+ .. note::
+ Any :exc:`OSError` exceptions raised from scanning the filesystem are
+ suppressed. This includes :exc:`PermissionError` when accessing
+ directories without read permission.
+
.. versionchanged:: 3.5
Support for recursive globs using "``**``".
This function may return duplicate path names if *pathname*
contains multiple "``**``" patterns and *recursive* is true.
+ .. note::
+ Any :exc:`OSError` exceptions raised from scanning the filesystem are
+ suppressed. This includes :exc:`PermissionError` when accessing
+ directories without read permission.
+
.. versionchanged:: 3.5
Support for recursive globs using "``**``".
``False``, this method follows symlinks except when expanding "``**``"
wildcards. Set *recurse_symlinks* to ``True`` to always follow symlinks.
+ .. note::
+ Any :exc:`OSError` exceptions raised from scanning the filesystem are
+ suppressed. This includes :exc:`PermissionError` when accessing
+ directories without read permission.
+
.. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
.. versionchanged:: 3.12
The paths are returned in no particular order.
If you need a specific order, sort the results.
+ .. note::
+ Any :exc:`OSError` exceptions raised from scanning the filesystem are
+ suppressed. This includes :exc:`PermissionError` when accessing
+ directories without read permission.
+
.. seealso::
:ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation.
--- /dev/null
+Document that :func:`glob.glob`, :func:`glob.iglob`,
+:meth:`pathlib.Path.glob`, and :meth:`pathlib.Path.rglob` silently suppress
+:exc:`OSError` exceptions raised from scanning the filesystem.