From c50d794c7bb81f31d1b977e63d0faba0b926a168 Mon Sep 17 00:00:00 2001 From: SarahPythonista <4283226+SarahPythonista@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:31:21 -0700 Subject: [PATCH] Improve the comment in URLError (#139874) Clarify that it It overrides `__init__` and `__str__`. --- Lib/urllib/error.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py index a9cd1ecadd6..beb32d0df48 100644 --- a/Lib/urllib/error.py +++ b/Lib/urllib/error.py @@ -18,7 +18,7 @@ class URLError(OSError): # URLError is a sub-type of OSError, but it doesn't share any of - # the implementation. need to override __init__ and __str__. + # the implementation. It overrides __init__ and __str__. # It sets self.args for compatibility with other OSError # subclasses, but args doesn't have the typical format with errno in # slot 0 and strerror in slot 1. This may be better than nothing.