[issue41973] Docs: TypedDict is now of type function instead of class

2021-08-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually most names defined in typing are no longer classes. -- assignee: -> docs@python components: +Documentation nosy: +docs@python, gvanrossum, kj versions: +Python 3.11 ___ Python tracker

[issue41973] Docs: TypedDict is now of type function instead of class

2021-08-01 Thread Serhiy Storchaka
Serhiy Storchaka 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 us

[issue41973] Docs: TypedDict is now of type function instead of class

2021-08-01 Thread Andrei Kulakov
Andrei Kulakov added the comment: I haven't looked too much into typing module, so take this with a grain of salt, but my understanding is that TypedDict is a special construct (as the first sentence in the docs defines it), which can be used as a base. I think most users would consider some

[issue41973] Docs: TypedDict is now of type function instead of class

2020-10-15 Thread Sorin Sbarnea
Change by Sorin Sbarnea : -- nosy: +ssbarnea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue41973] Docs: TypedDict is now of type function instead of class

2020-10-07 Thread Bernat Gabor
Bernat Gabor added the comment: This seem to apply to typing.NamedTuple too. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41973] Docs: TypedDict is now of type function instead of class

2020-10-07 Thread Bernat Gabor
Bernat Gabor added the comment: Static checkers/linters (see e.g. https://github.com/PyCQA/pylint/issues/3884) are caught of guard by being able to inherit from functions. They'll need to adapt, but let's update the documentation to reflect this. -- _

[issue41973] Docs: TypedDict is now of type function instead of class

2020-10-07 Thread Anthony Sottile
Anthony Sottile added the comment: Seems to be due to https://bugs.python.org/issue40187 -- nosy: +Anthony Sottile, serhiy.storchaka ___ Python tracker ___ ___

[issue41973] Docs: TypedDict is now of type function instead of class

2020-10-07 Thread Bernat Gabor
New submission from Bernat Gabor : ❯ py -3.8 -c 'from typing import TypedDict; print(type(TypedDict))' ❯ py -3.9 -c 'from typing import TypedDict; print(type(TypedDict))' Python 3.9 changed the type of the TypedDict but the documentation still says it's a class - see https://docs.python.org