]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve the comment in URLError (#139874)
authorSarahPythonista <4283226+SarahPythonista@users.noreply.github.com>
Tue, 14 Oct 2025 19:31:21 +0000 (12:31 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Oct 2025 19:31:21 +0000 (12:31 -0700)
Clarify that it It overrides `__init__` and `__str__`.

Lib/urllib/error.py

index a9cd1ecadd63f2b09ee4363fc283e8f1f5cbbb3b..beb32d0df48610de433b78d0cafefdd21faf8f16 100644 (file)
@@ -18,7 +18,7 @@ __all__ = ['URLError', 'HTTPError', 'ContentTooShortError']
 
 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.