Good discussion so far. Please let me know if I can help with implementation or documentation.
On Thu, Jul 20, 2017 at 8:40 AM INADA Naoki <songofaca...@gmail.com> wrote: > Hi, Victor. > > > Why not making abc faster instead of trying to workaround abc for perf > > issue? > > Current ABC provides: > > a) Prohibit instantiating without implement abstract methods. > b) registry based subclassing > > People want Java's interface only wants (a). (b) is unwanted side effect. > Right. (b) is only unwanted because it requires metaclasses, and metaclasses put constraints on inheritance. I have switched to using the "AbstractBaseClass" class I defined above in my own code. If that is the sort of solution that will be undertaken, then there is a question of what to call this class. If instead, every class will get this functionality automatically (which is more elegant), then someone needs to show that performance is unaffected. Also, this whole thing might not be that important if (as Guido implies) linters supplant this functionality. Although, linters would not catch the rare case where classes are programatically-generated. > > Additionally, even if CPython provide C implementation of ABCMeta, > other Python implementations won't. > So Abstract Class (not ABC) may be nice on such implementations too. > > I'm +1 to implement abc module in C. > And I think (a) can be nice first step, instead of implement all at once. > > Regards, > > INADA Naoki <songofaca...@gmail.com> > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- > > --- > You received this message because you are subscribed to a topic in the > Google Groups "python-ideas" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/python-ideas/r2YLrIEQlig/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > python-ideas+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/