mirror of
https://github.com/python/cpython.git
synced 2025-10-28 12:15:13 +00:00
[3.14] gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() (gh-135493)
(cherry picked from commit 56eabea, AKA gh-135438)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
This commit is contained in:
parent
d851f8e258
commit
f77a911c52
3 changed files with 40 additions and 5 deletions
|
|
@ -701,6 +701,7 @@ def test_local_kinds(self):
|
|||
'checks': CO_FAST_LOCAL,
|
||||
'res': CO_FAST_LOCAL,
|
||||
},
|
||||
defs.spam_with_global_and_attr_same_name: {},
|
||||
defs.spam_full_args: {
|
||||
'a': POSONLY,
|
||||
'b': POSONLY,
|
||||
|
|
@ -955,6 +956,10 @@ def new_var_counts(*,
|
|||
purelocals=5,
|
||||
globalvars=6,
|
||||
),
|
||||
defs.spam_with_global_and_attr_same_name: new_var_counts(
|
||||
globalvars=2,
|
||||
attrs=1,
|
||||
),
|
||||
defs.spam_full_args: new_var_counts(
|
||||
posonly=2,
|
||||
posorkw=2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue