diff --git a/Lib/warnings.py b/Lib/warnings.py index 0def518b1ab1c0..33fbd908feaa31 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -561,7 +561,7 @@ def __init__( ) -> None: if not isinstance(message, str): raise TypeError( - f"Expected an object of type str for 'msg', not {type(message).__name__!r}" + f"Expected an object of type str for 'message', not {type(message).__name__!r}" ) self.message = message self.category = category