TypeError: 'str' object is not callable
我的代码如下所示
class Restaurant():
'''描述餐馆的基本属性'''
def __init__(self,restaurant_name,cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
'''描述餐馆'''
print("This restaurant's type is " + self.cuisine_type + " . ")
print("This restaurant's name is " + self.restaurant_name.title() + ".")
def open_restautant(self):
'''餐馆营业提醒'''
print("Welcom our" + self.cuisine_type + " " + self.restaurant_name +" restaurant !" )
restaurant_1 = Restaurant('Mandclo' ,'fast restaurant')
restaurant_2 = Restaurant('水煮鱼','中餐厅')
restaurant_3 = Restaurant('千岛酱','日本菜')