(self)
return self._caps
Get the server capabilities, as read by __init__().
        If the CAPABILITIES command is not supported, an empty dict is
        returned.
Get the server capabilities, as read by __init__().
        If the CAPABILITIES command is not supported, an empty dict is
        returned.
Get the server capabilities as read by __init__ () . If the CAPABILITIES command is not supported an empty dict is returned .
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
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