From 769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 23 Jun 2021 09:51:44 -0700 Subject: bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839) All uses of this flag are either setting it or in doc or tests for it. So we should be able to get rid of it completely. --- Objects/codeobject.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'Objects/codeobject.c') diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 99199cc235..88e09ac4b9 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -372,13 +372,6 @@ _PyCode_New(struct _PyCodeConstructor *con) } init_code(co, con); - /* Check for any inner or outer closure references */ - if (!co->co_ncellvars && !co->co_nfreevars) { - co->co_flags |= CO_NOFREE; - } else { - co->co_flags &= ~CO_NOFREE; - } - return co; } -- cgit v1.2.1