diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-06-29 20:54:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 20:54:44 (GMT) |
commit | 2bf974ec842cc0ffeb6aae7a97a3a4ad774e61ff (patch) | |
tree | 69b6bd3916ac1ee1fc450822e36987490f2d2dbf /Doc | |
parent | 7244c57701d7f3f14605394b9e300a05b0f602b7 (diff) | |
download | cpython-2bf974ec842cc0ffeb6aae7a97a3a4ad774e61ff.zip cpython-2bf974ec842cc0ffeb6aae7a97a3a4ad774e61ff.tar.gz cpython-2bf974ec842cc0ffeb6aae7a97a3a4ad774e61ff.tar.bz2 |
[3.10] bpo-92336: [doc] clarify that the dfile is read by the traceback display code (GH-94409) (GH-94429)
(cherry picked from commit 68fb03249f3b17146db42b00a75718b823a2280c)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Automerge-Triggered-By: GH:iritkatriel
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/py_compile.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst index 4fba4cb..69b93a3 100644 --- a/Doc/library/py_compile.rst +++ b/Doc/library/py_compile.rst @@ -35,8 +35,9 @@ byte-code cache files in the directory containing the source code. in ``.pyc``. For example, if *file* is ``/foo/bar/baz.py`` *cfile* will default to ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. If *dfile* is - specified, it is used as the name of the source file in error messages - instead of *file*. If *doraise* is true, a :exc:`PyCompileError` is raised + specified, it is used instead of *file* as the name of the source file from + which source lines are obtained for display in exception tracebacks. + If *doraise* is true, a :exc:`PyCompileError` is raised when an error is encountered while compiling *file*. If *doraise* is false (the default), an error string is written to ``sys.stderr``, but no exception is raised. This function returns the path to byte-compiled file, i.e. |