[New-bugs-announce] [issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

Dennis Sweeney report at bugs.python.org
Mon May 3 23:49:13 EDT 2021


New submission from Dennis Sweeney <sweeney.dennis650 at gmail.com>:

After bpo-38530, I get this in the python shell:


Python 3.10.0b1 (tags/v3.10.0b1:ba42175, May  3 2021, 20:22:30) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
...     foobar = 1
...
>>> A.foocar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'A' has no attribute 'foocar'. Did you mean: 'foobar'?
>>>


But I get this in IDLE:

Python 3.10.0b1 (tags/v3.10.0b1:ba42175, May  3 2021, 20:22:30) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
class A:
    foobar = 1

    
A.foocar
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    A.foocar
AttributeError: type object 'A' has no attribute 'foocar'



Can we extend this functionality to IDLE, and fix the discrepancy?

----------
assignee: terry.reedy
components: IDLE
messages: 392850
nosy: Dennis Sweeney, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE doesn't offer "Did you mean?" for AttributeError and NameError
type: enhancement
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44026>
_______________________________________


More information about the New-bugs-announce mailing list