diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 36703f52a46..4ed6853e19f 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