parameters: (self)
return_statement: return ctx
docstring: Convert a structure into a Python native type.
docstring_summary: Convert a structure into a Python native type.
docstring_tokens: Convert a structure into a Python native type .
function: def to_dict(self):
          'Convert a structure into a Python native type.'
          ctx = Context()
          ContextFlags = self.ContextFlags
          ctx['ContextFlags'] = ContextFlags
          if (ContextFlags & CONTEXT_DEBUG_REGISTERS) == CONTEXT_DEBUG_REGISTERS:
              for key in self._ctx_debug:
                  ctx[key] = getattr(self, key)
          if (ContextFlags & CONTEXT_FLOATING_POINT) == CONTEXT_FLOATING_POINT:
              ctx['FloatSave'] = self.FloatSave.to_dict()
          if (ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS:
              for key in self._ctx_segs:
                  ctx[key] = getattr(self, key)
          if (ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER:
              for key in self._ctx_int:
                  ctx[key] = getattr(self, key)
          if (ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL:
              for key in self._ctx_ctrl:
                  ctx[key] = getattr(self, key)
          if (ContextFlags & CONTEXT_EXTENDED_REGISTERS) == CONTEXT_EXTENDED_REGISTERS:
              er = [ self.ExtendedRegisters[index] for index in compat.xrange(0, MAXIMUM_SUPPORTED_EXTENSION) ]
              er = tuple(er)
              ctx['ExtendedRegisters'] = er
          return ctx
function_tokens: def to_dict ( self ) : ctx = Context ( ) ContextFlags = self . ContextFlags ctx [ 'ContextFlags' ] = ContextFlags if ( ContextFlags & CONTEXT_DEBUG_REGISTERS ) == CONTEXT_DEBUG_REGISTERS : for key in self . _ctx_debug : ctx [ key ] = getattr ( self , key ) if ( ContextFlags & CONTEXT_FLOATING_POINT ) == CONTEXT_FLOATING_POINT : ctx [ 'FloatSave' ] = self . FloatSave . to_dict ( ) if ( ContextFlags & CONTEXT_SEGMENTS ) == CONTEXT_SEGMENTS : for key in self . _ctx_segs : ctx [ key ] = getattr ( self , key ) if ( ContextFlags & CONTEXT_INTEGER ) == CONTEXT_INTEGER : for key in self . _ctx_int : ctx [ key ] = getattr ( self , key ) if ( ContextFlags & CONTEXT_CONTROL ) == CONTEXT_CONTROL : for key in self . _ctx_ctrl : ctx [ key ] = getattr ( self , key ) if ( ContextFlags & CONTEXT_EXTENDED_REGISTERS ) == CONTEXT_EXTENDED_REGISTERS : er = [ self . ExtendedRegisters [ index ] for index in compat . xrange ( 0 , MAXIMUM_SUPPORTED_EXTENSION ) ] er = tuple ( er ) ctx [ 'ExtendedRegisters' ] = er return ctx