original_docstring: 
          returns a Deferred that fires once we've set this object up to
          track the protocol. Fails if we already have a protocol.
          
docstring: returns a Deferred that fires once we've set this object up to
  track the protocol. Fails if we already have a protocol.
docstring_tokens: returns a Deferred that fires once we ' ve set this object up to track the protocol . Fails if we already have a protocol .
code: def attach_protocol(self, proto):
          """
          returns a Deferred that fires once we've set this object up to
          track the protocol. Fails if we already have a protocol.
          """
          if self._protocol is not None:
              raise RuntimeError("Already have a protocol.")
          # make sure we have nothing in self.unsaved
          self.save()
          self.__dict__['_protocol'] = proto
  
          # FIXME some of this is duplicated from ctor
          del self.__dict__['_slutty_']
          self.__dict__['post_bootstrap'] = defer.Deferred()
          if proto.post_bootstrap:
              proto.post_bootstrap.addCallback(self.bootstrap)
          return self.__dict__['post_bootstrap']
code_tokens: def attach_protocol ( self , proto ) : if self . _protocol is not None : raise RuntimeError ( "Already have a protocol." ) self . save ( ) self . __dict__ [ '_protocol' ] = proto del self . __dict__ [ '_slutty_' ] self . __dict__ [ 'post_bootstrap' ] = defer . Deferred ( ) if proto . post_bootstrap : proto . post_bootstrap . addCallback ( self . bootstrap ) return self . __dict__ [ 'post_bootstrap' ]
short_docstring: returns a Deferred that fires once we've set this object up to
  track the protocol.
short_docstring_tokens: returns a Deferred that fires once we ' ve set this object up to track the protocol .
comment: """
          returns a Deferred that fires once we've set this object up to
          track the protocol. Fails if we already have a protocol.
          """$SEP$# make sure we have nothing in self.unsaved$SEP$# FIXME some of this is duplicated from ctor