mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-111874: Call __set_name__
on objects that define the method inside a typing.NamedTuple
class dictionary as part of the creation of that class (#111876)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
ffe1b2d07b
commit
22e411e1d1
3 changed files with 99 additions and 3 deletions
|
@ -0,0 +1,4 @@
|
|||
When creating a :class:`typing.NamedTuple` class, ensure
|
||||
:func:`~object.__set_name__` is called on all objects that define
|
||||
``__set_name__`` and exist in the values of the ``NamedTuple`` class's class
|
||||
dictionary. Patch by Alex Waygood.
|
Loading…
Add table
Add a link
Reference in a new issue