[3.10] bpo-92336: [doc] clarify that the dfile is read by the traceback display code (GH-94409) (GH-94429)

(cherry picked from commit 68fb03249f)


Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel
This commit is contained in:
Miss Islington (bot) 2022-06-29 13:54:44 -07:00 committed by GitHub
parent 7244c57701
commit 2bf974ec84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.