def _resource_path_list(resource, *elements):
 path = [(loc.__name__ or '') for loc in lineage(resource)]
 path.reverse()
 path.extend(elements)
 return path

def _resource_path_list ( resource , * elements ) : path = [ ( loc . __name__ or '' ) for loc in lineage ( resource ) ] path . reverse ( ) path . extend ( elements ) return path
implementation detail shared by resource_path and resource_path_tuple .