gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF (#111655)

This commit is contained in:
AN Long 2023-11-03 12:06:51 +08:00 committed by GitHub
parent 93206d19a3
commit 3a1b09e6d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 6 deletions

View file

@ -1844,6 +1844,13 @@ class NameErrorTests(unittest.TestCase):
self.assertIn("nonsense", err.getvalue())
self.assertIn("ZeroDivisionError", err.getvalue())
def test_gh_111654(self):
def f():
class TestClass:
TestClass
self.assertRaises(NameError, f)
# Note: name suggestion tests live in `test_traceback`.