diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2021-02-04 23:52:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 23:52:16 (GMT) |
commit | b6d68aa08baebb753534a26d537ac3c0d2c21c79 (patch) | |
tree | 8678fd8056357e83a28a44dda92f857a01aa8ec9 /Lib/collections | |
parent | 196d4deaf4810a0bba75ba537dd40f2d71a5a634 (diff) | |
download | cpython-b6d68aa08baebb753534a26d537ac3c0d2c21c79.zip cpython-b6d68aa08baebb753534a26d537ac3c0d2c21c79.tar.gz cpython-b6d68aa08baebb753534a26d537ac3c0d2c21c79.tar.bz2 |
bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439)
Diffstat (limited to 'Lib/collections')
-rw-r--r-- | Lib/collections/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 7d33813..6fe3c4c 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -407,7 +407,7 @@ def namedtuple(typename, field_names, *, rename=False, defaults=None, module=Non namespace = { '_tuple_new': tuple_new, - '__builtins__': None, + '__builtins__': {}, '__name__': f'namedtuple_{typename}', } code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' |