backlinks to this page:
Plugin Backlinks: Nothing was found.
Github:
A python attribute between double underscores dunder, the .__base__
attribute let you reference the parent of a child class.
class Vehicle(): can_fly = False number_of_weels = 0 class Car(Vehicle): number_of_weels = 4 def __init__(self, color): self.color = color my_car = Car("red") print(my_car.__dict__['color']) print(type(my_car).__dict__['number_of_weels']) print(type(my_car).__base__.__dict__['can_fly'])