From: SarahPythonista <4283226+SarahPythonista@users.noreply.github.com> Date: Tue, 14 Oct 2025 19:31:21 +0000 (-0700) Subject: Improve the comment in URLError (#139874) X-Git-Tag: v3.15.0a2~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c50d794c7bb81f31d1b977e63d0faba0b926a168;p=thirdparty%2FPython%2Fcpython.git Improve the comment in URLError (#139874) Clarify that it It overrides `__init__` and `__str__`. --- diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py index a9cd1ecadd63..beb32d0df486 100644 --- a/Lib/urllib/error.py +++ b/Lib/urllib/error.py @@ -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.