mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
check local class namespace before reaching for cells (closes #17853)
This commit is contained in:
parent
f256f5f3eb
commit
3b0431dc60
10 changed files with 187 additions and 122 deletions
|
|
@ -388,12 +388,14 @@ def _call_with_frames_removed(f, *args, **kwds):
|
|||
# Python 3.3a4 3230 (revert changes to implicit __class__ closure)
|
||||
# Python 3.4a1 3250 (evaluate positional default arguments before
|
||||
# keyword-only defaults)
|
||||
# Python 3.4a1 3260 (add LOAD_CLASSDEREF; allow locals of class to override
|
||||
# free vars)
|
||||
#
|
||||
# MAGIC must change whenever the bytecode emitted by the compiler may no
|
||||
# longer be understood by older implementations of the eval loop (usually
|
||||
# due to the addition of new opcodes).
|
||||
|
||||
_MAGIC_BYTES = (3250).to_bytes(2, 'little') + b'\r\n'
|
||||
_MAGIC_BYTES = (3260).to_bytes(2, 'little') + b'\r\n'
|
||||
_RAW_MAGIC_NUMBER = int.from_bytes(_MAGIC_BYTES, 'little')
|
||||
|
||||
_PYCACHE = '__pycache__'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue