mirror of
https://github.com/python/cpython.git
synced 2025-11-09 18:11:38 +00:00
gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() (gh-135438)
This commit is contained in:
parent
c7f4a80079
commit
56eabea056
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