Issue #2095: type(obj) should not call obj's metaclass's __getattribute__ (pypy/pypy)
22 Jul
2015
22 Jul
'15
2:34 p.m.
New issue 2095: type(obj) should not call obj's metaclass's __getattribute__ https://bitbucket.org/pypy/pypy/issues/2095/type-obj-should-not-call-objs-me... kmod: Not really sure what's going on here, but this code produces different output between CPython (2.7.6) and PyPy (2.6.0): ``` class M(type): def __getattribute__(self, attr): print "getattribute", attr raise Exception() class C(object): __metaclass__ = M c = C() print type(c) ``` PyPy calls `__getattribute__("__class__")` but cpython does not. Not sure why the exception doesn't get propagated or the return value (if one was generated) gets ignored.
3354
Age (days ago)
3354
Last active (days ago)
0 comments
1 participants
participants (1)
-
kmod