I need to return an instance of Bike in the constructor. For example:
class Bike(object):
def __init__(self,color):
self.bikeColor = color
return self #It should return an instance of the class; is this not right?
myBike = Bike("blue")
When I do the above, I get the following error:
TypeError: __init__() should return None, not 'Bike'
If this is the case, how could I return an instance if its only suppose to return None
?