Python Abstract Classes
Today I learned that python has abstract classes. You can do something like:
from abc import ABC, abstractmethod
class Hittable(ABC):
@abstractmethod
def hit(self, ray_tmin: float, ray_tmax: float, rec: HitRecord) -> bool: ...This is like having a virtual method in C++ and the base class is also not directly instantiable.