[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Steven D'Aprano
On Fri, Nov 26, 2021 at 12:15:10AM +0900, Stephen J. Turnbull wrote: > I will grant that restricting the type of compiled annotations from > typing.Any to "string serializing an object's AST" could reasonably be > said to be "going out of your way to break other use cases". You have > a valid bee

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Guido van Rossum
On Thu, Nov 25, 2021 at 3:49 PM Greg Ewing wrote: > On 26/11/21 4:15 am, Stephen J. Turnbull wrote: > > My understanding is that optional, > > incremental type hints are and have always been considered the primary > > use case for annotations by the BDFL > > I'm not sure that's true. The way I re

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Rob Cliffe via Python-Dev
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

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Oscar Benjamin
On Thu, 25 Nov 2021 at 15:16, Stephen J. Turnbull 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 "typi

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Greg Ewing
On 26/11/21 4:15 am, Stephen J. Turnbull wrote: My understanding is that optional, incremental type hints are and have always been considered the primary use case for annotations by the BDFL I'm not sure that's true. The way I remember it, back when annotations were first introduced, the BDFL d

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Christopher Barker
First: At this point, I am not advocating anything in particular. I am just asking that the SC makes a clear statement about the intention at this point. >From Barry's email: """ This is also a call to you, the folks who both care deeply about typing in Python, and have a solid understanding of t

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Rob Cliffe via Python-Dev
On 25/11/2021 15:15, Stephen J. Turnbull 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. “As you will no doubt be aware, the plans for development of the outlying regions of the Galaxy require the bui

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Steven D'Aprano
On Sat, Nov 20, 2021 at 11:46:56PM -0800, Christopher Barker wrote: > One example is a use case of mine -- I have built a hierarchical object > system, built on dataclasses, in which the annotation absolutely has to be > an actual type(class) object. PEP 563 will very much break this use case. I

[Python-Dev] Re: The current state of typing PEPs

2021-11-25 Thread Stephen J. Turnbull
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 use