2020-05-16 00:14:06 +02:00
|
|
|
|
Typing Extensions – Backported and Experimental Type Hints for Python
|
|
|
|
|
|
|
|
|
|
The typing module was added to the standard library in Python 3.5 on a
|
2020-11-20 21:18:43 +01:00
|
|
|
|
provisional basis and will no longer be provisional in Python 3.7.
|
|
|
|
|
However, this means users of Python 3.5 - 3.6 who are unable to upgrade
|
|
|
|
|
will not be able to take advantage of new types added to the typing
|
|
|
|
|
module, such as typing.Text or typing.Coroutine.
|
2020-05-16 00:14:06 +02:00
|
|
|
|
|
2020-11-20 21:18:43 +01:00
|
|
|
|
The typing_extensions module contains both backports of these changes as
|
|
|
|
|
well as experimental types that will eventually be added to the typing
|
|
|
|
|
module, such as Protocol or TypedDict.
|
2020-05-16 00:14:06 +02:00
|
|
|
|
|
2020-11-20 21:18:43 +01:00
|
|
|
|
Users of other Python versions should continue to install and use the
|
|
|
|
|
typing module from PyPi instead of using this one unless specifically
|
|
|
|
|
writing code that must be compatible with multiple Python versions or
|
|
|
|
|
requires experimental types.
|