def GetDataAsObject(self):
if self._pyregf_value.type in self._STRING_VALUE_TYPES:<EOL><INDENT>try:<EOL><INDENT>return self._pyregf_value.get_data_as_string()<EOL><DEDENT>except IOError as exception:<EOL><INDENT>raise errors.WinRegistryValueError(<EOL>'<STR_LIT>'.format(<EOL>self._pyregf_value.name, exception))<EOL><DEDENT><DEDENT>if self._pyregf_value.type in self._INTEGER_VALUE_TYPES:<EOL><INDENT>try:<EOL><INDENT>return self._pyregf_value.get_data_as_integer()<EOL><DEDENT>except (IOError, OverflowError) as exception:<EOL><INDENT>raise errors.WinRegistryValueError(<EOL>'<STR_LIT>'.format(<EOL>self._pyregf_value.name, exception))<EOL><DEDENT><DEDENT>try:<EOL><INDENT>value_data = self._pyregf_value.data<EOL><DEDENT>except IOError as exception:<EOL><INDENT>raise errors.WinRegistryValueError(<EOL>'<STR_LIT>'.format(<EOL>self._pyregf_value.name, exception))<EOL><DEDENT>if self._pyregf_value.type == definitions.REG_MULTI_SZ:<EOL><INDENT>if value_data is None:<EOL><INDENT>return []<EOL><DEDENT>try:<EOL><INDENT>utf16_string = value_data.decode('<STR_LIT>')<EOL>return list(filter(None, utf16_string.split('<STR_LIT:\x00>')))<EOL><DEDENT>except UnicodeError as exception:<EOL><INDENT>raise errors.WinRegistryValueError(<EOL>'<STR_LIT>'.format(<EOL>self._pyregf_value.name, exception))<EOL><DEDENT><DEDENT>return value_data<EOL>
Retrieves the data as an object.

        Returns:
          object: data as a Python type.

        Raises:
          WinRegistryValueError: if the value data cannot be read.