Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Of course. There is more than one way to fix it:

* Make GenericAlias substituting type variables in list. It is easier and it 
will fix this particular case, but there will be subtle differences in __args__.
* Add a GenericAlias subclass with overridden constructor, __repr__, 
__getitem__, __reduce__ (like the _GenericAlias subclass added in issue40397).

I think we should first resolve issue40397 and later decide what way be better. 
It is not necessary to reproduce all details of _GenericAlias if the practical 
behavior is the same.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40494>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to