Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
diff --git a/Lib/code.py b/Lib/code.py
index 9020aab..a1ac904 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -293,7 +293,7 @@
     else:
         try:
             import readline
-        except ImportError:
+        except ModuleNotFoundError:
             pass
     console.interact(banner)