SoloLearn's lesson misunderstanding
SoloLearn's lesson misunderstanding Code: 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): class_name = "goblin" desc = "A foul creature" goblin = Goblin("Gobbly") def examine(noun): if noun in GameObject.objects: return GameObject.objects[noun].get_desc() else: return "There is no {} here.".format(noun) Question: I don't understand why first line with "GameObject.objects..." in this code was written without any tabs? If it's in the definition of class GameObject it should be written with one tab before the line code, but it was written as something after the class definition. It will be maybe okay, but after that is "def get_desc" with one tab, so get_desc is in class.