code: def append_code_expr(self, code):
          
          # expects a string.
          if isinstance(code, str) and not isinstance(code, unicode):
              code = unicode(code)
          if not isinstance(code, unicode):
              raise TypeError("string expected")
          log.debug("compiling code %s...", code)
          try:
              code_obj = compile(code, '<string>', 'eval')
              self.code_objs[code] = code_obj
          except SyntaxError as syntax_err:
              log.error("cannot compile %s: %s", code, syntax_err)
              raise
          log.debug("compiled code %s", code)
docs: Compile argument and adds it to the list of code objects.