[Python-checkins] Clarify rx parameter of compileall functions (#25857)

JulienPalard webhook-mailer at python.org
Tue May 4 15:37:47 EDT 2021


https://github.com/python/cpython/commit/09490298d4485e9322edc6e1e8e15eb66c586164
commit: 09490298d4485e9322edc6e1e8e15eb66c586164
branch: main
author: Jean-Abou-Samra <37271310+Jean-Abou-Samra at users.noreply.github.com>
committer: JulienPalard <julien at palard.fr>
date: 2021-05-04T21:37:39+02:00
summary:

Clarify rx parameter of compileall functions (#25857)

files:
M Doc/library/compileall.rst

diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst
index 5c6e68f930475..de34664acb84a 100644
--- a/Doc/library/compileall.rst
+++ b/Doc/library/compileall.rst
@@ -166,9 +166,10 @@ Public functions
    If *force* is true, modules are re-compiled even if the timestamps are up to
    date.
 
-   If *rx* is given, its search method is called on the complete path to each
+   If *rx* is given, its ``search`` method is called on the complete path to each
    file considered for compilation, and if it returns a true value, the file
-   is skipped.
+   is skipped. This can be used to exclude files matching a regular expression,
+   given as a :ref:`re.Pattern <re-objects>` object.
 
    If *quiet* is ``False`` or ``0`` (the default), the filenames and other
    information are printed to standard out. Set to ``1``, only errors are
@@ -242,9 +243,10 @@ Public functions
    cases where the source file does not exist at the time the byte-code file is
    executed.
 
-   If *rx* is given, its search method is passed the full path name to the
+   If *rx* is given, its ``search`` method is passed the full path name to the
    file being compiled, and if it returns a true value, the file is not
-   compiled and ``True`` is returned.
+   compiled and ``True`` is returned. This can be used to exclude files matching
+   a regular expression, given as a :ref:`re.Pattern <re-objects>` object.
 
    If *quiet* is ``False`` or ``0`` (the default), the filenames and other
    information are printed to standard out. Set to ``1``, only errors are



More information about the Python-checkins mailing list