0
class A(object)
class B(object)
    self.a = A
class C(B):
    self.a = D

I want to make sure D is always a subclass of A. Is that doable in Python w/o using type hints?

rivu
  • 2,004
  • 2
  • 29
  • 45

0 Answers0