Łukasz Langa added the comment:
The change to disallow this in Python 3.9 was deliberate, see BPO-40187 and its
description.
Your attempt to make `isinstance()` work with TypedDict subclasses goes
directly against this design. In fact, PEP 589 explicitly says that:
- Methods are not
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 1.0 -> 2.0
pull_requests: +26501
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28057
___
Python tracker
New submission from Nikita Sobolev :
Some context. I have a `User` class defined as a `TypedDict`:
```python
from typing import TypedDict
class User(TypedDict):
name: str
registered: bool
```
Now, I want to check if some `dict` is an instance of `User` like so:
`isinstance(my_dict,