New GitHub issue #92355 from Gouvernathor:<br>
<hr>
<pre>
**Feature or enhancement**
Make both AttributeErrors the same.
I'm not 100% sure whether this is a bug report or a feature request.
**Pitch**
For the next example classes, the behavior of `X().slot` is slightly different :
```py
class A:
pass
class B:
__slots__ = "slot"
class C:
__slots__ = ()
```
`A().slot` and `C().slot` will raise `AttributeError: 'A' object has no attribute 'slot'`.
However, `B().slot` will raise `AttributeError: slot`.
The supplementary information (although limited) from the first message should be included in the second one as well. And I think it's a mistake to make a slotted missing attribute and an unslotted one behave differently, for arguable visibility reasons.
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/92355">View on GitHub</a>
<p>Labels: type-feature</p>
<p>Assignee: </p>