Skip to content

Commit 6488adb

Browse files
committed
Add requested changes
1 parent 6f7e03a commit 6488adb

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,22 +175,22 @@ Other language changes
175175
* Several error messages incorrectly using the term "argument" have been corrected.
176176
(Contributed by Stan Ulbrych in :gh:`133382`.)
177177

178-
* The interpreter now provides a suggestion tries to provide a suggestion when
178+
* The interpreter now tries to provide a suggestion when
179179
:func:`delattr` fails due to a missing attribute.
180180
When an attribute name that closely resembles an existing attribute is used,
181-
the interpreter will suggest the correct attribute
182-
name in the error message. For example:
181+
the interpreter will suggest the correct attribute name in the error message.
182+
For example:
183183

184184
.. doctest::
185185

186-
>>> class A:
187-
... pass
188-
>>> a = A()
189-
>>> a.abcde = 1
190-
>>> del a.abcdf # doctest: +ELLIPSIS
191-
Traceback (most recent call last):
192-
...
193-
AttributeError: 'A' object has no attribute 'abcdf'. Did you mean: 'abcde'?
186+
>>> class A:
187+
... pass
188+
>>> a = A()
189+
>>> a.abcde = 1
190+
>>> del a.abcdf # doctest: +ELLIPSIS
191+
Traceback (most recent call last):
192+
...
193+
AttributeError: 'A' object has no attribute 'abcdf'. Did you mean: 'abcde'?
194194

195195
(Contributed by Nikita Sobolev and Pranjal Prajapati in :gh:`136588`.)
196196

Lib/test/test_traceback.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4036,10 +4036,6 @@ def callable():
40364036

40374037

40384038
class BaseSuggestionTests(SuggestionFormattingTestMixin):
4039-
"""
4040-
Subclasses need to implement the get_suggestion method.
4041-
"""
4042-
40434039
def test_suggestions(self):
40444040
class Substitution:
40454041
noise = more_noise = a = bc = None

0 commit comments

Comments
 (0)