BST20180801.py
def trans(self, u, v):
        '''
        assume that u is not None
        '''        
        if u.p == None:
            self.root = v
        elif u.p.l == u:
            u.p.l = v
        else:
            u.p.r = v
        if v:
            v.p = u.p

        assume that u is not None
        
assume that u is not None
assume that u is not None
def trans(self, u, v):
        if u.p == None:
            self.root = v
        elif u.p.l == u:
            u.p.l = v
        else:
            u.p.r = v
        if v:
            v.p = u.p
def trans ( self , u , v ) : if u . p == None : self . root = v elif u . p . l == u : u . p . l = v else : u . p . r = v if v : v . p = u . p
assume that u is not None
assume that u is not None
'''
        assume that u is not None
        '''
self
u
v