diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-05-04 19:57:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 19:57:35 (GMT) |
commit | 5dffd79ee99a57443e02d9322daf03b0a1bc44c1 (patch) | |
tree | a410b9f9b1076ada26f05403cb7572ce609af21d /Doc/library | |
parent | af14e1df373c0a619c8ed3b02ebe44c1a90fd468 (diff) | |
download | cpython-5dffd79ee99a57443e02d9322daf03b0a1bc44c1.zip cpython-5dffd79ee99a57443e02d9322daf03b0a1bc44c1.tar.gz cpython-5dffd79ee99a57443e02d9322daf03b0a1bc44c1.tar.bz2 |
Clarify rx parameter of compileall functions (GH-25857)
(cherry picked from commit 09490298d4485e9322edc6e1e8e15eb66c586164)
Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/compileall.rst | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 5c6e68f..de34664 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 |