
My 2¢ from a position of *extreme ignorance*, not to mention zero interest in annotations (all welcome to shoot me down in flames, or treat me with contemptuous silence. But *occasionall*y the "idiot's" point of view is worth considering, so here goes). ISTM that typing/annotations have been allowed to drift without a clear end in view, rather like a ship that is steered in one direction by one person, then in another by someone else, with nobody knowing what the destination port is. As witness the conflicting views in this thread. At the risk of being rude, the phrase "headless chickens" comes to mind. ISTM that it is time to take a step back and decide on a definite policy. Perhaps a definitive pronouncement from Guido. Or the SC. Or a discussion from all parties that reaches an acceptable conclusion. Then stick to it. Even if it causes some backward incompatibility - ISTM that things have changed so rapidly that this really would be an acceptable evil if it results in clarity for the future. Meanwhile, do not change anything, do not approve any PEPs, until this conclusion is reached. I apologise if I am being presumptuous in commenting on a subject I know almost nothing about. /I'm just a soul whose intentions are good,// //Oh Lord, please don't let me be misunderstood.// / Best wishes Rob Cliffe On 25/11/2021 23:51, Oscar Benjamin wrote:
On Thu, 25 Nov 2021 at 15:16, Stephen J. Turnbull <stephenjturnbull@gmail.com> wrote:
Executive summary:
The typing-suspicious crowd has a valid complaint about PEPs 563 and 649, but it's not that they weren't warned.
Christopher Barker writes:
Annotations can be, and are, used for other things than "typing". I just noticed that PEP 563 apparently deprecated those other uses (well, sort of: "uses for annotations incompatible with the aforementioned PEPs should be considered deprecated")
Not a PEP proponent (or even a typing user), but I thought this had been made clear long ago. My understanding is that optional, incremental type hints are and have always been considered the primary use case for annotations by the BDFL and AFAICT the SC following the BDFL. If compatibility with typing is an issue, then the burden of implementing that is on the other application. Typing *might* do something to help, but it's not obligated to do so. This was not my understanding of annotations when they were introduced e.g.: https://www.python.org/dev/peps/pep-3107/#use-cases
As I remember it, a decision about the purpose of annotations was *explicitly* not made when they were introduced. It was clear that typing was a major potential use and then at some point (around about the introduction of the typing module) there seemed to be a shift in people's understanding of what annotations were for. Eventually that reached the point that people who were particularly interested in typing had no memory of the fact that the purpose of annotations had not really been specified as being about typing in the first place.
It looks to me like Chris has identified in PEP 563 what is potentially the earliest reference (in an accepted PEP) to the idea that non-typing uses of annotations are to be discouraged.
-- Oscar _______________________________________________ Python-Dev mailing list --python-dev@python.org To unsubscribe send an email topython-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived athttps://mail.python.org/archives/list/python-dev@python.org/message/BERGEZTX... Code of Conduct:http://python.org/psf/codeofconduct/