Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

TypeDict is a callable, it can be used as

    Point2D = TypedDict('Point2D', x=int, y=int, label=str)

It can also be used as a base in class definition, but is is not a class 
itself. It does not occur in __bases__ of the created class, and it cannot be 
used in isinstance() and issubclass() checks. It is just yet one weird way to 
customize class creation.

I agree that documenting it as class is not correct. Perhaps it should be 
declared as a function (with specifying its signature when used as a function) 
and referred with the :data: role.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to