Browse Source
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222)
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.pull/16238/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 135 additions and 10 deletions
-
60Lib/test/test_typing.py
-
81Lib/typing.py
-
4Misc/NEWS.d/next/Library/2019-09-17-12-28-27.bpo-38191.1TU0HV.rst
@ -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. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue