[Python-Dev] Re: Implementation of PEP-0604

2019-11-17 Thread Nick Coghlan
On Mon., 18 Nov. 2019, 6:52 am MRAB, wrote: > On 2019-11-17 20:09, Ivan Levkivskyi wrote: > > To add some more input about forward references, here are couple of > > thoughts: > > > > 1. I think ideally we should support forward references to the same > > extent they are currently supported: > >

[Python-Dev] Re: Implementation of PEP-0604

2019-11-17 Thread MRAB
On 2019-11-17 20:09, Ivan Levkivskyi wrote: To add some more input about forward references, here are couple of thoughts: 1. I think ideally we should support forward references to the same extent they are currently supported: i.e. Union[None, "ForwardRef"], Union["OtherForwardRef", None], and

[Python-Dev] Re: Implementation of PEP-0604

2019-11-17 Thread Ivan Levkivskyi
To add some more input about forward references, here are couple of thoughts: 1. I think ideally we should support forward references to the same extent they are currently supported: i.e. Union[None, "ForwardRef"], Union["OtherForwardRef", None], and Union["ForwardRef", "OtherForwardRef"] should a

[Python-Dev] Re: Implementation of PEP-0604

2019-11-13 Thread Richard Eames
Thanks for the encouragement! I've been working some more on it since I had some more free cycles in the last few days and I think I've got to the limit of my capabilities. I think I've got it to a point where it needs more eyes because my experience level writing code in the python interprete

[Python-Dev] Re: Implementation of PEP-0604

2019-11-12 Thread Philippe Prados
Cool ! I'm very happy you take time to do this job. Your idea to use a shadowobject objet to promote just-in-time is very good for me, and can be used for others extensions. Thanks Philippe Prados Le sam. 9 nov. 2019 à 00:12, Richard Eames a écrit : > Hi Philippe and list, > > Long time lur

[Python-Dev] Re: Implementation of PEP-0604

2019-11-08 Thread Richard Eames
Hi Philippe and list, Long time lurker here, I've had a few spare cycles at $work this week that I spent exploring an alternate implementation to PEP604 starting with the implementation from Philippe. I don't say "reference implementation", because it doesn't implement PEP604 faithfully, but i

[Python-Dev] Re: Implementation of PEP-0604

2019-11-04 Thread Kyle Stanley
> I agree with Nick, this is indeed big, but not impossible. If you are not sure yet whether you will work on implementation, you can focus on polishing the PEP text, and then if it is accepted and you will decide to give implementation to someone else, we will find a volunteer. Unless I'm misunde

[Python-Dev] Re: Implementation of PEP-0604

2019-11-04 Thread Ivan Levkivskyi
On Thu, 31 Oct 2019 at 23:20, Nick Coghlan wrote: > [...snip...] > >> >> It's not enough to move the typing classes, I must move >> functools.lru_cache() and dependencies, collections.abs.Mapping and >> dependencies, and track the frame level. >> >> *It's too big for me.* >> >> > It's certainly n

[Python-Dev] Re: Implementation of PEP-0604

2019-10-31 Thread Nick Coghlan
On Thu., 31 Oct. 2019, 11:45 pm Philippe Prados, wrote: > To implement a full version of PEP604 > , I analyze the typing module, > started with _GenericAlias. > 1) I must rewrite : > >- def _type_check(arg, msg, is_argument=True) >- def _type_rep