10000 gh-96663: Add a better error message for __dict__-less classes setattr by Gobot1234 · Pull Request #103232 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-96663: Add a better error message for __dict__-less classes setattr #103232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 22, 2023
Prev Previous commit
Next Next commit
Fix another broken test
  • Loading branch information
Gobot1234 committed Apr 4, 2023
commit 88cbb1b49854d2b46ac1fb424a25ae31dda701d4
4 changes: 2 additions & 2 deletions Lib/test/test_descrtut.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# of much interest anymore), and a few were fiddled to make the output
# deterministic.

from test.support import sortdict
import doctest
import unittest
from test.support import sortdict


class defaultdict(dict):
Expand Down Expand Up @@ -139,7 +139,7 @@ def merge(self, other):
>>> a.x1 = 1
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'defaultdict2' object has no attribute 'x1'
AttributeError: 'defaultdict2' object has no attribute 'x1' and no __dict__ for setting new attributes
>>>

"""
Expand Down
0