summaryrefslogtreecommitdiffstats
path: root/Lib/collections
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-03-18 07:27:39 (GMT)
committerGitHub <noreply@github.com>2019-03-18 07:27:39 (GMT)
commit23581c018fceb607fe829a41c6fbe81b4d502cab (patch)
tree9c8f76fb525ad1ac974a08ebac92812db7feeefa /Lib/collections
parent6a16b18224fa98f6d192aa5014affeccc0376eb3 (diff)
downloadcpython-23581c018fceb607fe829a41c6fbe81b4d502cab.zip
cpython-23581c018fceb607fe829a41c6fbe81b4d502cab.tar.gz
cpython-23581c018fceb607fe829a41c6fbe81b4d502cab.tar.bz2
bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375)
Diffstat (limited to 'Lib/collections')
-rw-r--r--Lib/collections/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index 632a509..cff75a4 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -445,6 +445,8 @@ def namedtuple(typename, field_names, *, rename=False, defaults=None, module=Non
'__doc__': f'{typename}({arg_list})',
'__slots__': (),
'_fields': field_names,
+ '_field_defaults': field_defaults,
+ # alternate spelling for backward compatiblity
'_fields_defaults': field_defaults,
'__new__': __new__,
'_make': _make,