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

1 · 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.