From 500c178ffcd69d327c592233bbe4a971bc4e5ac1 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 16 Dec 2022 18:27:46 +0100 Subject: [PATCH] Fix example by adding repr in an error message. --- pep-0562.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep-0562.rst b/pep-0562.rst index d353e97cb38..2c446c67ff5 100644 --- a/pep-0562.rst +++ b/pep-0562.rst @@ -43,7 +43,7 @@ on module *instances*. For example:: if name in deprecated_names: warn(f"{name} is deprecated", DeprecationWarning) return globals()[f"_deprecated_{name}"] - raise AttributeError(f"module {__name__} has no attribute {name}") + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") # main.py