BST20180801.py
def successor(self, i):
        '''
        caution: return value maybe None, means i does not have predecessor Node
        '''
        if i.r:
            return self.minimum(i.r)
        else:
            y = i.p
            while y and y.r == i:
                i = y
                y = i.p
            return y

        caution: return value maybe None, means i does not have predecessor Node
        
return value maybe None, means i does not have predecessor Node
return value maybe None means i does not have predecessor Node
def successor(self, i):
        if i.r:
            return self.minimum(i.r)
        else:
            y = i.p
            while y and y.r == i:
                i = y
                y = i.p
            return y
def successor ( self , i ) : if i . r : return self . minimum ( i . r ) else : y = i . p while y and y . r == i : i = y y = i . p return y
caution: return value maybe None, means i does not have predecessor Node
caution : return value maybe None means i does not have predecessor Node
'''
        caution: return value maybe None, means i does not have predecessor Node
        '''
self
i