""" yield try: targets = [ self.getFromSlots(attribute=target) ] except GameException, e: try: targets = self.get(attribute=target) except GameException, e: targets = self.location().get(attribute=target) for target in targets: if target: target.checkUse(self) call = target(self) if isinstance(call,GeneratorType): while step(call): yield def inventory(self): """\ See what you are carrying. inventory """ self.sendMessage("inventory",inventory=self.contains) def equipment(self,target=None,slot=None): """\ See what you are wearing. equipment <slot>
def __call__(self,user): self.user = user call = self.rule(self) if isinstance(call,GeneratorType): while step(call): yield