#NEWLINE# def pop_all( self ) : #NEWLINE# #INDENT# 'Preserve the context stack by transferring it to a new instance' #NEWLINE# new_stack = type ( self ) ( ) #NEWLINE# new_stack . _exit_callbacks = self . _exit_callbacks #NEWLINE# self . _exit_callbacks = deque ( ) #NEWLINE# return self