gamelib.py
def say(self, message: str, msg_type: str, done: Queue) -> None:
        "Prompts a message box of a given type in the canvas."

        if isinstance(msg_type, MessageType):
            message_type = msg_type.value
        elif isinstance(msg_type, str) and msg_type.upper() in (msgtype.name for msgtype in MessageType):
            message_type = getattr(MessageType, msg_type.upper()).value
        else:
            raise InvalidMessageType()
        response = getattr(messagebox, message_type)(self.title(), message, parent=self)
        done.put(response)
Prompts a message box of a given type in the canvas.
Prompts a message box of a given type in the canvas.
Prompts a message box of a given type in the canvas .
def say(self, message: str, msg_type: str, done: Queue) -> None:
        if isinstance(msg_type, MessageType):
            message_type = msg_type.value
        elif isinstance(msg_type, str) and msg_type.upper() in (msgtype.name for msgtype in MessageType):
            message_type = getattr(MessageType, msg_type.upper()).value
        else:
            raise InvalidMessageType()
        response = getattr(messagebox, message_type)(self.title(), message, parent=self)
        done.put(response)
def say ( self , message : str , msg_type : str , done : Queue ) -> None : if isinstance ( msg_type , MessageType ) : message_type = msg_type . value elif isinstance ( msg_type , str ) and msg_type . upper ( ) in ( msgtype . name for msgtype in MessageType ) : message_type = getattr ( MessageType , msg_type . upper ( ) ) . value else : raise InvalidMessageType ( ) response = getattr ( messagebox , message_type ) ( self . title ( ) , message , parent = self ) done . put ( response )
Prompts a message box of a given type in the canvas.
Prompts a message box of a given type in the canvas .
"Prompts a message box of a given type in the canvas."
self
message
str
msg_type
str
done
Queue