Python: fix TypeError: NamedTuple() got an unexpected keyword argument

· Adamj · Aug. 13, 2026, 8:24 p.m.
Summary
This post discusses a TypeError encountered when defining a NamedTuple in Python with a keyword argument per field. The author describes a specific code snippet that triggers a DeprecationWarning when run in Python 3.13 and 3.14, highlighting potential issues developers may face with NamedTuples in recent Python versions.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →