File tree Expand file tree Collapse file tree 1 file changed +17
-18
lines changed
Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -176,24 +176,23 @@ Other language changes
176176 (Contributed by Stan Ulbrych in :gh: `133382 `.)
177177
178178* The interpreter now provides helpful suggestions
179- when :func: `delattr ` fails due to a missing attribute.
180-
181- When an attribute name that closely resembles an existing attribute is used,
182- the interpreter will suggest the correct attribute
183- name in the error message. For example:
184-
185- .. doctest ::
186-
187- >>> class A :
188- ... pass
189- >>> a = A()
190- >>> a.abcde = 1
191- >>> del a.abcdf # doctest: +ELLIPSIS
192- Traceback (most recent call last):
193- ...
194- AttributeError: 'A' object has no attribute 'abcdf'. Did you mean: 'abcde'?
195-
196- (Contributed by Nikita Sobolev and Pranjal Prajapati in :gh: `136588 `.)
179+ when :func: `delattr ` fails due to a missing attribute.
180+ 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:
183+
184+ .. doctest ::
185+
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'?
194+
195+ (Contributed by Nikita Sobolev and Pranjal Prajapati in :gh: `136588 `.)
197196
198197
199198New modules
You can’t perform that action at this time.
0 commit comments