diff --git a/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py b/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py index 8291ef2df5bb..adffc945baad 100644 --- a/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py +++ b/sdks/python/apache_beam/typehints/intrinsic_one_ops_test.py @@ -30,9 +30,7 @@ class IntrinsicOneOpsTest(unittest.TestCase): def test_unary_intrinsic_ops_are_in_the_same_order_as_in_cpython(self): if sys.version_info >= (3, 12): dis_order = dis.__dict__['_intrinsic_1_descs'] - beam_ops = [fn.__name_upper() for fn in intrinsic_one_ops.INT_ONE_OPS] - for fn in intrinsic_one_ops.INT_ONE_OPS: - beam_ops.append(fn.__name__.upper()) + beam_ops = [fn.__name__.upper() for fn in intrinsic_one_ops.INT_ONE_OPS] self.assertListEqual(dis_order, beam_ops) diff --git a/sdks/python/apache_beam/typehints/opcodes.py b/sdks/python/apache_beam/typehints/opcodes.py index 11e607543e93..62c7a8fadc35 100644 --- a/sdks/python/apache_beam/typehints/opcodes.py +++ b/sdks/python/apache_beam/typehints/opcodes.py @@ -471,7 +471,7 @@ def load_fast(state, arg): def load_fast_and_clear(state, arg): state.stack.append(state.vars[arg]) - del state.vars[arg] + state.vars[arg] = None def store_fast(state, arg):