(self, read_preference=ReadPreference.PRIMARY)
return any(self.apply_selector(read_preference, None))
Does this topology have any readable servers available matching the
        given read preference?

        :Parameters:
          - `read_preference`: an instance of a read preference from
            :mod:`~pymongo.read_preferences`. Defaults to
            :attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`.

        .. note:: When connected directly to a single server this method
          always returns ``True``.

        .. versionadded:: 3.4
Does this topology have any readable servers available matching the
        given read preference?
Does this topology have any readable servers available matching the given read preference?
def has_readable_server(self, read_preference=ReadPreference.PRIMARY):
        """Does this topology have any readable servers available matching the
        given read preference?

        :Parameters:
          - `read_preference`: an instance of a read preference from
            :mod:`~pymongo.read_preferences`. Defaults to
            :attr:`~pymongo.read_preferences.ReadPreference.PRIMARY`.

        .. note:: When connected directly to a single server this method
          always returns ``True``.

        .. versionadded:: 3.4
        """
        common.validate_read_preference("read_preference", read_preference)
        return any(self.apply_selector(read_preference, None))
def has_readable_server ( self , read_preference = ReadPreference . PRIMARY ) : common . validate_read_preference ( "read_preference" , read_preference ) return any ( self . apply_selector ( read_preference , None ) )