codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question on ABC classes


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