def get( self, keys, default = None ):
		self.trace()

		# handle no keys
		if not len(keys):
			if default:
				return default
			elif self.default:
				return self.default
			elif self.tree[None]:
				return self.tree[None]
			else:
				raise self.NoDefaultException, 'No arguments given, and no default response defined.'

		# fetch keys
		subtree = self.tree
		found = 0

		for key in keys:
			key = key.lower().strip()
			try:
				if key in subtree:
					subtree = subtree[key]
					found   = 1
					continue
				break
			except TypeError:
				break

		# fetch text
		if found:
			try:
				return subtree[None]
			except TypeError:
				return subtree
		else:
			raise self.NoSuchKeyException, 'There is no response for the given topic.'
dataset/ETHPy150Open Pathoschild/stewbot/stewbot/components/Documentation.py/Documentation.get/original