#NEWLINE# def _keep_alive( x , memo ) : #NEWLINE# #INDENT# 'Keeps a reference to the object x in the memo.\n\n    Because we remember objects by their id, we have\n    to assure that possibly temporary objects are kept\n    alive by referencing them.\n    We store a reference at the id of the memo, which should\n    normally not be used unless someone tries to deepcopy\n    the memo itself...\n    ' #NEWLINE# try : #NEWLINE# #INDENT# memo [ id ( memo ) ] . append ( x ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# memo [ id ( memo ) ] = [ x ]