Goblin game / example from tutorial
Первая часть примера прошла хорошо, но после добавления второй часть примера вышло вот что: class GameObject: class_name = "" desc = "" objects = {} def __init__(self, name): self.name = name GameObject.objects[self.class_name] = self def get_desc(self): return self.class_name + "\n" + self.desc class Goblin(GameObject): def __init__(self, name): self.class_name = "goblin" self.desc = "A foul creature" super().__init__(name) def get_input(): command = input(":").split() verb_word = command[0] if verb_word in verb_dict: verb = verb_dict[verb_word] else: print("Unknown verb {}".format(verb_word)) return if len(command) >= 2: noun_word = command[1] print(verb(noun_word)) else: print(verb()) def say(noun): return 'You said "{}"'.format(noun) def examine(noun): if noun in GameObject.objects: return GameObject.objects[noun].get_desc() else: return "There is no {} here.".format(noun) goblin = Goblin("Gobbly") verb_dict = { "say":say, "examine":examine, } while True: get_input() Собственно ошибка, которая не дает мне перейти к 3 части примера: File "..\Playground\", line 41 else: ^ SyntaxError: invalid syntax