syndisco.RandomWeighted
- class RandomWeighted(p_respond: float = -1, names: Iterable[str] | None = None)
Bases:
TurnManagerEnable a participant to reply with a set probability, else randomly select another participant.
- DEFAULT_RESPOND_PROBABILITY = 0.5
- next() str
Get the username of the next speaker.
- Raises:
ValueError – if no names have been provided from the constructor, or from the TurnManager.set() method
- Returns:
the next speaker’s username
- Return type:
str
- set_names(names: Iterable[str]) None
Initialize the manager by providing the names of the users.
- Parameters:
names (Iterable[str]) – the usernames of the participants