# class inheritance

"""
>>> x = OldBenz()
>>> print(x.number_of_wheels)
4
>>> print(x.get_speed())
70

>>> my = VW()
>>> print(my.number_of_wheels)
4
>>> print(my.diesel)
False

>>> print(my.star_logo)
Traceback (most recent call last):
...
AttributeError: 'VW' object has no attribute 'star_logo'

"""


class Vehicle(object):
    number_of_wheels = None

    def get_speed(self):
        """Return the maximum speed."""
        raise NotImplementedError

class Bike(Vehicle):
    number_of_wheels = 2

    def get_speed(self):
        return 20


class Car(Vehicle):
    brand = None
    number_of_wheels = 4

    def get_speed(self):
        return 90


class Benz(Car):
    star_logo = True
    brand = "Mercedes"

class OldBenz(Benz):
    star_logo = False

    def get_speed(self):
        return super(OldBenz, self).get_speed() - 20
        # super_object = super(OldBenz, self)
        # print(type(super_object))
        # meth = super_object.get_speed
        # speed = meth()
        # return speed - 20

class VW(Car):
    brand = "Volkswagen"

class VW(VW):
    diesel = False

if __name__ == '__main__':
    import doctest
    doctest.testmod()

996a7d42b1992b218d64e6fe8b7f0811dfdc1d88
<mask token>


class Bike(Vehicle):
    <mask token>

    def get_speed(self):
        return 20


class Car(Vehicle):
    brand = None
    number_of_wheels = 4

    def get_speed(self):
        return 90


class Benz(Car):
    star_logo = True
    brand = 'Mercedes'


class OldBenz(Benz):
    star_logo = False

    def get_speed(self):
        return super(OldBenz, self).get_speed() - 20


class VW(Car):
    brand = 'Volkswagen'


class VW(VW):
    diesel = False


<mask token>

<mask token>


class Bike(Vehicle):
    number_of_wheels = 2

    def get_speed(self):
        return 20


class Car(Vehicle):
    brand = None
    number_of_wheels = 4

    def get_speed(self):
        return 90


class Benz(Car):
    star_logo = True
    brand = 'Mercedes'


class OldBenz(Benz):
    star_logo = False

    def get_speed(self):
        return super(OldBenz, self).get_speed() - 20


class VW(Car):
    brand = 'Volkswagen'


class VW(VW):
    diesel = False


<mask token>

<mask token>


class Vehicle(object):
    <mask token>

    def get_speed(self):
        """Return the maximum speed."""
        raise NotImplementedError


class Bike(Vehicle):
    number_of_wheels = 2

    def get_speed(self):
        return 20


class Car(Vehicle):
    brand = None
    number_of_wheels = 4

    def get_speed(self):
        return 90


class Benz(Car):
    star_logo = True
    brand = 'Mercedes'


class OldBenz(Benz):
    star_logo = False

    def get_speed(self):
        return super(OldBenz, self).get_speed() - 20


class VW(Car):
    brand = 'Volkswagen'


class VW(VW):
    diesel = False


<mask token>

<mask token>


class Vehicle(object):
    number_of_wheels = None

    def get_speed(self):
        """Return the maximum speed."""
        raise NotImplementedError


class Bike(Vehicle):
    number_of_wheels = 2

    def get_speed(self):
        return 20


class Car(Vehicle):
    brand = None
    number_of_wheels = 4

    def get_speed(self):
        return 90


class Benz(Car):
    star_logo = True
    brand = 'Mercedes'


class OldBenz(Benz):
    star_logo = False

    def get_speed(self):
        return super(OldBenz, self).get_speed() - 20


class VW(Car):
    brand = 'Volkswagen'


class VW(VW):
    diesel = False


if __name__ == '__main__':
    import doctest
    doctest.testmod()

# class inheritance

"""
>>> x = OldBenz()
>>> print(x.number_of_wheels)
4
>>> print(x.get_speed())
70

>>> my = VW()
>>> print(my.number_of_wheels)
4
>>> print(my.diesel)
False

>>> print(my.star_logo)
Traceback (most recent call last):
...
AttributeError: 'VW' object has no attribute 'star_logo'

"""


class Vehicle(object):
    number_of_wheels = None

    def get_speed(self):
        """Return the maximum speed."""
        raise NotImplementedError

class Bike(Vehicle):
    number_of_wheels = 2

    def get_speed(self):
        return 20


class Car(Vehicle):
    brand = None
    number_of_wheels = 4

    def get_speed(self):
        return 90


class Benz(Car):
    star_logo = True
    brand = "Mercedes"

class OldBenz(Benz):
    star_logo = False

    def get_speed(self):
        return super(OldBenz, self).get_speed() - 20
        # super_object = super(OldBenz, self)
        # print(type(super_object))
        # meth = super_object.get_speed
        # speed = meth()
        # return speed - 20

class VW(Car):
    brand = "Volkswagen"

class VW(VW):
    diesel = False

if __name__ == '__main__':
    import doctest
    doctest.testmod()
