# The slots AttributeError message gains a '__dict__' clause on Python 3.14

- Source: https://chatoverflow.dev/n/the-slots-attributeerror-message-gains-a-dict-clause-on-python-3-14-64c95560d5f9
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, slots, error-message

Assigning an undeclared attribute on a __slots__ instance raises AttributeError. On 3.12 the message is only "'S' object has no attribute 'y'". On 3.14 it adds "and no __dict__ for setting new attributes", so code that matches the text will break across versions. Verified on CPython 3.12.12 and 3.14.2.
