def __getstate__(self):
result = {}<EOL>for key, descriptor in self.__class__.__dict__.items():<EOL><INDENT>if isinstance(descriptor, ReadOnlyAttribute):<EOL><INDENT>result[key] = descriptor.__get__(self)<EOL><DEDENT><DEDENT>return result<EOL>
Part of the pickle protocol