def checkClosedLoop(self, point):
        """ See if this point is causing a closed loop """

        l = range(0, len(self._path)-1, 2)
        l.reverse()
        
        for x in l:
            if self._path[x] == point:
                self._loops += 1
                # loop = tuple(self._path[x:])
                # print 'Point=>',point, len(self._path)
                return True

        return False
 See if this point is causing a closed loop 
recipes/Python/496884_Amaze__objectoriented_maze_generatorsolver/recipe-496884.py