#NEWLINE# def pop_from_form_data( relative_data , absolute_data , path ) : #NEWLINE# #INDENT# path = path . split ( '/' ) #NEWLINE# if ( path and ( path [ 0 ] == '' ) ) : #NEWLINE# #INDENT# data = absolute_data #NEWLINE# path = path [ 2 : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data = relative_data #NEWLINE# #UNINDENT# while ( path and data ) : #NEWLINE# #INDENT# ( key , path ) = ( path [ 0 ] , path [ 1 : ] ) #NEWLINE# try : #NEWLINE# #INDENT# if path : #NEWLINE# #INDENT# data = data [ key ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( data , dict ) : #NEWLINE# #INDENT# return data . pop ( key ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except KeyError : #NEWLINE# #INDENT# return None