Author lukasz.langa
Recipients adelfino, cheryl.sabella, docs@python, gvanrossum, levkivskyi, lukasz.langa, matrixise, r.david.murray
Date 2018-05-15.04:06:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Guido, do you really want to stress at this point for Python 3.8 that annotations do not have an intended purpose? That is clearly not true.

1. PEP 526 was created purely with types in mind and was inspired by PEP 484's lack of this functionality.

2. PEP 563 defines a future import which will become the default in a future release (currently marked as 4.0). This default stops evaluating annotations at runtime, which again was inspired by the typing use case.

3. Dataclasses in PEP 557 are designed to leverage types in annotations. A few quotes from that PEP:

> A class decorator is provided which inspects a class definition for variables with type annotations as defined in PEP 526, "Syntax for Variable Annotations".

> One main design goal of Data Classes is to support static type checkers. The use of PEP 526 syntax is one example of this, but so is the design of the fields() function and the @dataclass decorator.

4. PEP 560 added support for `__class_getitem__` and `__mro_entries__` in core purely for the purpose of generic types.

5. For the above reasons, PEP 563 states that non-typing usage of annotations is deprecated:
Date User Action Args
2018-05-15 04:06:37lukasz.langasetrecipients: + lukasz.langa, gvanrossum, r.david.murray, docs@python, matrixise, levkivskyi, cheryl.sabella, adelfino
2018-05-15 04:06:37lukasz.langasetmessageid: <>
2018-05-15 04:06:37lukasz.langalinkissue32769 messages
2018-05-15 04:06:36lukasz.langacreate