With myCar.set_make=('Porche')
, you are setting this member the Car class as the 'Porche'
string, but you are not calling the method.
Just remove the =
to solve it:
myCar.set_make('Porche')
myCar.get_make() # Porche
Besides, as @DSM points out, there is an error in the argument of set_make
:
def set_make(self, make):
self.__make = make # carMake is not defined!
However, this use of getters and setters in Python is strongly discouraged. If you need something similar for any reason, consider using properties.