summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-09-07 11:36:43 (GMT)
committerGitHub <noreply@github.com>2021-09-07 11:36:43 (GMT)
commitfc840736e54da0557616882012f362b809490165 (patch)
tree9f1ec23eada4342c400b013102b782820418f7a2 /Doc/reference
parent608a6292366ebba20f33d93d8b52cbb928429e47 (diff)
downloadcpython-fc840736e54da0557616882012f362b809490165.zip
cpython-fc840736e54da0557616882012f362b809490165.tar.gz
cpython-fc840736e54da0557616882012f362b809490165.tar.bz2
bpo-44964: Add a note explaining the new semantics of f_last_i in frame objects (GH-28200)
(cherry picked from commit fa2c0b85a8d5c9486661083afdf38cbaadb3432a) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index eefdc3d..477daae 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1034,8 +1034,9 @@ Internal types
:attr:`f_code` is the code object being executed in this frame; :attr:`f_locals`
is the dictionary used to look up local variables; :attr:`f_globals` is used for
global variables; :attr:`f_builtins` is used for built-in (intrinsic) names;
- :attr:`f_lasti` gives the precise instruction (this is an index into the
- bytecode string of the code object).
+ :attr:`f_lasti` gives the precise instruction (it represents a wordcode index, which
+ means that to get an index into the bytecode string of the code object it needs to be
+ multiplied by 2).
Accessing ``f_code`` raises an :ref:`auditing event <auditing>`
``object.__getattr__`` with arguments ``obj`` and ``"f_code"``.