summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_descr.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 36703f5..4ed6853 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -870,6 +870,11 @@ def dynamics():
# Test dynamic instances
class C(object):
__dynamic__ = 1
+ # XXX Ideally the following def shouldn't be necessary,
+ # but it's too much of a performance burden.
+ # See XXX comment in slot_tp_getattr_hook.
+ def __getattr__(self, name):
+ raise AttributeError, name
a = C()
verify(not hasattr(a, "foobar"))
C.foobar = 2