Question on ABC classes

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Oct 23 01:36:10 EDT 2020


On 23/10/20 2:13 pm, Julio Di Egidio wrote:
> I am now thinking whether I could achieve the "standard"
> behaviour via another approach, say with decorators, somehow
> intercepting calls to __new__... maybe.

I'm inclined to step back and ask -- why do you care about this?

Would it actually do any harm if someone instantiated your
base class? If not, then it's probably not worth going out
of your way to prevent it.

-- 
Greg


More information about the Python-list mailing list