We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ea78fd commit 479ac5cCopy full SHA for 479ac5c
Lib/test/test_capi/test_opt.py
@@ -893,9 +893,13 @@ def testfunc(n):
893
self.assertIn("_COMPARE_OP_STR", uops)
894
895
def test_type_inconsistency(self):
896
- def testfunc(n):
897
- for i in range(n):
898
- x = _test_global + _test_global
+ ns = {}
+ exec(textwrap.dedent("""
+ def testfunc(n):
899
+ for i in range(n):
900
+ x = _test_global + _test_global
901
+ """), globals(), ns)
902
+ testfunc = ns['testfunc']
903
# Must be a real global else it won't be optimized to _LOAD_CONST_INLINE
904
global _test_global
905
_test_global = 0
0 commit comments