Very nice ideas. The plus and minus signs are much better than :: and :::. I am glad people are working on that. [+T: (str, int)] would be similar to TypeVar(“T”, str, int, covariant=True).
Abdulla Sent from my iPhone > On 8 Feb 2022, at 6:49 PM, Abdulla Al Kathiri <alkathiri.abdu...@gmail.com> > wrote: > > Thank you Stephan. Very fair points you brought. I will make sure to check > the typing-sig. > > Sent from my iPhone > >> On 8 Feb 2022, at 6:00 PM, James H-B <gobot123...@gmail.com> wrote: >> >> I really like the idea as a whole presented here. I have a few concerns >> here though: >> 1. The support for constraints overlaps with union which is undesireable, >> Jelle has previously suggested using TypeVar in (constraint1, constraint2, >> ...) which I think is much nicer. >> 2. The syntax for defining co/contravariance feels very clunky, have you >> seen https://github.com/python/typing/issues/813? I think this method of >> defining the variance is much neater. >> _______________________________________________ >> Python-ideas mailing list -- python-ideas@python.org >> To unsubscribe send an email to python-ideas-le...@python.org >> https://mail.python.org/mailman3/lists/python-ideas.python.org/ >> Message archived at >> https://mail.python.org/archives/list/python-ideas@python.org/message/2NVCKPPEWUIXNQTUBTGPLB326CLP6V37/ >> Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/W45LNLWOAX7BH5IR7UFTZWW7MM5KL6W2/ Code of Conduct: http://python.org/psf/codeofconduct/