On 15 September 2016 at 21:11, אלעזר <elaz...@gmail.com> wrote:
> Yes the "class A[T]:" syntax requires on the ability to express variance as
> an operator, but not the other way around.
> It might be an argument in favor of switching to the + syntax: to make
> possible future syntax change in class definition somewhat easier to
A future syntax change is very unlikely, as people encountering "class
SomeName(Generic[+T]):" for the first time can easily google "python
generic class" and hopefully find useful answers in the documentation
for typing.Generic. By contrast, "class SomeName[+T]:" would have to
be covered directly in the class statement documentation, which runs
completely counter to the notion of type hints as executable code
annotations (rather than being an unavoidable core part of the
language the way they are in statically typed languages).
Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/