Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

> 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'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44655>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to