mirror of
https://github.com/python/cpython.git
synced 2025-11-20 10:57:44 +00:00
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:
parent
b57481318e
commit
2bf31ccab3
3 changed files with 133 additions and 8 deletions
|
|
@ -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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue