parameters: (self)
return_statement: return self._caps
docstring: Get the server capabilities, as read by __init__().
          If the CAPABILITIES command is not supported, an empty dict is
          returned.
docstring_summary: Get the server capabilities, as read by __init__().
          If the CAPABILITIES command is not supported, an empty dict is
          returned.
docstring_tokens: Get the server capabilities as read by __init__ () . If the CAPABILITIES command is not supported an empty dict is returned .
function: def getcapabilities(self):
          """Get the server capabilities, as read by __init__().
          If the CAPABILITIES command is not supported, an empty dict is
          returned."""
          if self._caps is None:
              self.nntp_version = 1
              self.nntp_implementation = None
              try:
                  resp, caps = self.capabilities()
              except (NNTPPermanentError, NNTPTemporaryError):
                  # Server doesn't support capabilities
                  self._caps = {}
              else:
                  self._caps = caps
                  if 'VERSION' in caps:
                      # The server can advertise several supported versions,
                      # choose the highest.
                      self.nntp_version = max(map(int, caps['VERSION']))
                  if 'IMPLEMENTATION' in caps:
                      self.nntp_implementation = ' '.join(caps['IMPLEMENTATION'])
          return self._caps
function_tokens: def getcapabilities ( self ) : if self . _caps is None : self . nntp_version = 1 self . nntp_implementation = None try : resp , caps = self . capabilities ( ) except ( NNTPPermanentError , NNTPTemporaryError ) : # Server doesn't support capabilities self . _caps = { } else : self . _caps = caps if 'VERSION' in caps : # The server can advertise several supported versions, # choose the highest. self . nntp_version = max ( map ( int , caps [ 'VERSION' ] ) ) if 'IMPLEMENTATION' in caps : self . nntp_implementation = ' ' . join ( caps [ 'IMPLEMENTATION' ] ) return self . _caps