From a3c3ffa68e6fc4524b1149a6a14d56c3a2e9b612 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 18 Feb 2021 12:35:37 +0100 Subject: bpo-42990: Add __builtins__ attribute to functions (GH-24559) Expose the new PyFunctionObject.func_builtins member in Python as a new __builtins__ attribute on functions. Document also the behavior change in What's New in Python 3.10. --- Objects/funcobject.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Objects/funcobject.c') diff --git a/Objects/funcobject.c b/Objects/funcobject.c index b331c4c4d6..523930da8d 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -250,6 +250,7 @@ static PyMemberDef func_memberlist[] = { {"__doc__", T_OBJECT, OFF(func_doc), 0}, {"__globals__", T_OBJECT, OFF(func_globals), READONLY}, {"__module__", T_OBJECT, OFF(func_module), 0}, + {"__builtins__", T_OBJECT, OFF(func_builtins), READONLY}, {NULL} /* Sentinel */ }; -- cgit v1.2.1