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.
This commit is contained in:
Serhiy Storchaka 2019-09-17 21:22:00 +03:00 committed by GitHub
parent b57481318e
commit 2bf31ccab3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 133 additions and 8 deletions

View file

@ -0,0 +1,4 @@
Constructors of :class:`~typing.NamedTuple` and :class:`~typing.TypedDict`
types now accept arbitrary keyword argument names, including "cls", "self",
"typename", "_typename", "fields" and "_fields". Passing positional
arguments by keyword is deprecated.