BST20180801.py
def delete1(self, z):
        '''
        assume that u is not None
        '''
        if z.l == None:
            self.trans(z,z.r)
        elif z.r == None:
            self.trans(z,z.l)
        else:
            y = self.successor(z)
            if y.p != z:
                self.trans(y,y.r)
                y.r = z.r
                y.r.p = y
            self.trans(z,y)
            y.l = z.l
            y.l.p = y

        assume that u is not None
        
assume that u is not None
assume that u is not None
def delete1(self, z):
        if z.l == None:
            self.trans(z,z.r)
        elif z.r == None:
            self.trans(z,z.l)
        else:
            y = self.successor(z)
            if y.p != z:
                self.trans(y,y.r)
                y.r = z.r
                y.r.p = y
            self.trans(z,y)
            y.l = z.l
            y.l.p = y
def delete1 ( self , z ) : if z . l == None : self . trans ( z , z . r ) elif z . r == None : self . trans ( z , z . l ) else : y = self . successor ( z ) if y . p != z : self . trans ( y , y . r ) y . r = z . r y . r . p = y self . trans ( z , y ) y . l = z . l y . l . p = y
assume that u is not None
assume that u is not None
'''
        assume that u is not None
        '''
self
z