> Anyway, my expectation is that going along this way (i.e. removing all 
> runtime API apart from a necessary minimum)
> will give a minor speed-up as compared to PEP 560 at the cost of a breaking 
> change (even for small number of developers).

I don't think the change will be breaking: usage of this class will be entirely 
voluntarily and does not replace typing.Generic

> PEP 560 already gives overhead of 80% as compared to normal classes in worst 
> case scenario
> (empty body with a single generic base). This is actually less than for ABCs 
> (they can give up to 120% in worst case scenario).

GenericMeta inherits from ABCMeta. Do you mean that it will be removed after 
560 lands?

> Moreover, performance is not a single motivation for PEP 560, there are other 
> arguments such as metaclass conflicts which will
> not be solved without the machinery proposed by the PEP.

Perhaps you can consider designing Generic / GenericMeta in a way that will 
allow end user to create GenericStub-alike class without much trouble?
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to