parameters: (self)
return_statement: return d
docstring: Override pickling behavior.
docstring_summary: Override pickling behavior.
docstring_tokens: Override pickling behavior .
function: def __getstate__(self):
          """Override pickling behavior."""
          # pickling pointer is not allowed
          is_open = self.is_open
          self.close()
          d = dict(self.__dict__)
          d['is_open'] = is_open
          uri = self.uri.value
          try:
              uri = uri.decode('utf-8')
          except AttributeError:
              pass
          del d['handle']
          d['uri'] = uri
          return d
function_tokens: def __getstate__ ( self ) : # pickling pointer is not allowed is_open = self . is_open self . close ( ) d = dict ( self . __dict__ ) d [ 'is_open' ] = is_open uri = self . uri . value try : uri = uri . decode ( 'utf-8' ) except AttributeError : pass del d [ 'handle' ] d [ 'uri' ] = uri return d