This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients eric.smith, pablogsal
Date 2021-07-16.20:32:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626467530.13.0.138617768703.issue44655@roundup.psfhosted.org>
In-reply-to
Content
> it would be nicer if the version with the suggestion were more like the version without the suggestion

Agreed, but that is actually not related with the suggestions. We only append a string at the end of whatever exception it was there. This difference is based on the attribute error for a slot not initialized vs an attribute error for something that is not there. For example, in 3.9:

---

class E:
    __slots__=('blech')

E().blech

Traceback (most recent call last):
  File "/home/pablogsal/github/cpython/lel.py", line 6, in <module>
    E().blech
AttributeError: blech


while

class E:
    __slots__=('blech')

E().bluch

Traceback (most recent call last):
  File "/home/pablogsal/github/cpython/lel.py", line 4, in <module>
    E().bluch
AttributeError: 'E' object has no attribute 'bluch'
History
Date User Action Args
2021-07-16 20:32:10pablogsalsetrecipients: + pablogsal, eric.smith
2021-07-16 20:32:10pablogsalsetmessageid: <1626467530.13.0.138617768703.issue44655@roundup.psfhosted.org>
2021-07-16 20:32:10pablogsallinkissue44655 messages
2021-07-16 20:32:10pablogsalcreate