Commit 80f4bc34 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Callattr fix

Used a hardcoded CXX exception style in the non-rewriteable case.
parent 414d207f
......@@ -2821,7 +2821,7 @@ Box* callattrInternal(Box* obj, BoxedString* attr, LookupScope scope, CallRewrit
r_val = grewrite_args.out_rtn;
}
} else {
val = getattrInternalEx<CXX>(obj, attr, NULL, scope == CLASS_ONLY, true, &bind_obj, &r_bind_obj);
val = getattrInternalEx<S>(obj, attr, NULL, scope == CLASS_ONLY, true, &bind_obj, &r_bind_obj);
}
if (val == NULL) {
......
# Make sure that callattrs handle exceptions (including
# different exception styles) correctly.
class C(object):
def __getattr__(self, attr):
raise ValueError()
def f():
c = C()
for i in xrange(10000):
try:
c.foo()
except ValueError:
pass
f()
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