# Наследование

# issubclass(sub, par)
# 15.__class__ # узнать тип объекта
# 15.__base__ # хранит ссылку на родителя

class Vehicle:
    
    def __init__(self, name, max_speed, mileage):
        self.name = name
        self.max_speed = max_speed
        self.mileage = mileage

    def display_info(self):
        print(f"Vehicle Name: {self.name}, Speed: {self.max_speed}, Mileage: {self.mileage}")


class Bus(Vehicle):
    pass


class Person:
    
    def __init__(self, name):
        self.name = name

    def get_name(self):
        return self.name
    
    def is_employee(self):
        return False
    

class Employee(Person):

    def is_employee(self):
        return True
    

class Shape:
    pass

class Ellipse(Shape):
    pass

class Circle(Ellipse):
    pass

class Polygon(Shape):
    pass

class Triangle(Polygon):
    pass

class Rectangle(Polygon):
    pass

class Square(Rectangle):
    pass


class MyList(list):
    def remove_all(self, value):
        self[:] = [i for i in self if value != i]


class NewInt(int):

    def repeat(self, value=2):
        return int(str(self)*value)
    
    def to_bin(self):
        return int(bin(self)[2:])


def main():
    i = NewInt(34)
    print(i.repeat(3))
    print(i.to_bin())
    


if __name__ == "__main__":
    main()

