1    def findForDelete(self, item, found, locPtr, parent):
2        locPtr = self.root
3        parent = None
4        found = False
5        while True:
6            if found is True or locPtr == None:
7                return (found, locPtr, parent)
8            if item < locPtr.key:  #descend left
9                parent = locPtr
10               locPtr = locPtr.left
11           elif item > locPtr.key:  #descend right
12               parent = locPtr
13               locPtr = locPtr.right
14           else:
15               found = True
16       return (found, locPtr, parent)