]> granicus.if.org Git - python/commit
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 17 Sep 2019 18:41:55 +0000 (11:41 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2019 18:41:55 +0000 (11:41 -0700)
commit54ba5f19d4a654768c785468d736ed0bd05947f5
tree91404a699de636e75ba058fcad324b15ce64cdb6
parent3c1786f18b1542e71454f37e3f3ca1ef3eec0e5f
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222)

This includes such names as "cls", "self", "typename", "_typename",
"fields" and "_fields".
Passing positional arguments by keyword is deprecated.
(cherry picked from commit 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2019-09-17-12-28-27.bpo-38191.1TU0HV.rst [new file with mode: 0644]