#NEWLINE# def resolve( self , key , is_local ) : #NEWLINE# #INDENT# "Resolve a variable name in a possibly local context\n\n        Parameters\n        ----------\n        key : text_type\n            A variable name\n        is_local : bool\n            Flag indicating whether the variable is local or not (prefixed with\n            the '@' symbol)\n\n        Returns\n        -------\n        value : object\n            The value of a particular variable\n        " #NEWLINE# try : #NEWLINE# #INDENT# if is_local : #NEWLINE# #INDENT# return self . scope [ key ] #NEWLINE# #UNINDENT# if self . has_resolvers : #NEWLINE# #INDENT# return self . resolvers [ key ] #NEWLINE# #UNINDENT# assert ( ( not is_local ) and ( not self . has_resolvers ) ) #NEWLINE# return self . scope [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return self . temps [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise compu . ops . UndefinedVariableError ( key , is_local )