def _dispatch( self, cmdList, str):
		"""
		Find a match for str in the cmdList, and call the 
		  associated method with arguments that are the 
		  matching grouped sub-exprs from the regex.
		"""
		for cmd in cmdList:
			found = cmd[1].match( str) # or .search()
			if found:
				return cmd[2]( self, *found.groups() )
		return None

		Find a match for str in the cmdList, and call the 
		  associated method with arguments that are the 
		  matching grouped sub-exprs from the regex.
		
recipes/Python/82585_Compiletime_regexs_patternbased/recipe-82585.py