File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1034,9 +1034,8 @@ Internal types
1034
1034
:attr: `f_code ` is the code object being executed in this frame; :attr: `f_locals `
1035
1035
is the dictionary used to look up local variables; :attr: `f_globals ` is used for
1036
1036
global variables; :attr: `f_builtins ` is used for built-in (intrinsic) names;
1037
- :attr: `f_lasti ` gives the precise instruction (it represents a wordcode index, which
1038
- means that to get an index into the bytecode string of the code object it needs to be
1039
- multiplied by 2).
1037
+ :attr: `f_lasti ` gives the precise instruction (this is an index into the
1038
+ bytecode string of the code object).
1040
1039
1041
1040
Accessing ``f_code `` raises an :ref: `auditing event <auditing >`
1042
1041
``object.__getattr__ `` with arguments ``obj `` and ``"f_code" ``.
Original file line number Diff line number Diff line change @@ -1948,7 +1948,8 @@ Changes in the C API
1948
1948
offset instead of a simple offset into the bytecode string. This means that this
1949
1949
number needs to be multiplied by 2 to be used with APIs that expect a byte offset
1950
1950
instead (like :c:func:`PyCode_Addr2Line` for example). Notice as well that the
1951
- `` f_lasti`` member of `` FrameObject`` objects is not considered stable.
1951
+ `` f_lasti`` member of `` FrameObject`` objects is not considered stable: please
1952
+ use :c:func:`PyFrame_GetLineNumber` instead.
1952
1953
1953
1954
CPython bytecode changes
1954
1955
========================
You can’t perform that action at this time.
0 commit comments