On Mon, 6 May 2019 at 03:23, Serge Matveenko <s...@matveenko.ru> wrote:
> On Sun, May 5, 2019 at 8:23 PM Stephen J. Turnbull > <turnbull.stephen...@u.tsukuba.ac.jp> wrote: > > > > Serge Matveenko writes: > > > > > So, I would like to propose adding a third main object called > > > `interface` in addition to `object` and `type` and to use it to define > > > interface objects. Such interfaces could then be used in the class > > > definition in the following way. > > > > How does this compare to existing technology such as zope.interface? > > Why do you want it to behave differently where it does? > > Also, `strict-interfaces` provides typing annotations support and > could be easily be adopted in conjunction with PEP 544. > I am not sure why one would need another special base class to enforce checking implementations statically. Currently mypy can already enforce implementations of Protocols/ABCs at instantiation time. I can imagine one can just add a flag (like --early-implementations) without other changes. -- Ivan
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/