def __set__ ( self , instance , value ) : self . map [ id ( instance ) ] = ( weakref . ref ( instance ) , value )
python foreign key to a foreign key
Set a related object for an instance .
def __set__(self, instance, value):
        """ Set a related object for an instance. """

        self.map[id(instance)] = (weakref.ref(instance), value)