Commit 6d94627f authored by Guido van Rossum's avatar Guido van Rossum

Allow AttributeError as well as TypeError for attribute-less objects.

parent c4416d5a
......@@ -481,7 +481,7 @@ def objects():
verify(not hasattr(a, "foo"))
try:
a.foo = 12
except TypeError:
except (AttributeError, TypeError):
pass
else:
verify(0, "object() should not allow setting a foo attribute")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment