Files
Andrey Vlasovskikh 332709f9ee Fixed SOE in PyClass.isOverriddenMRO() check (PY-15002)
In Python 2 it is possible to create an endless metaclass chain by
defining '__metaclass__' at the top-level to be one of the classes
defined in the module. We assume that these circular metaclasses don't
override `mro()` in order to prevent infinite recursion in this check.
2015-02-17 16:46:35 +03:00

12 lines
107 B
Python

class __metaclass__(object):
pass
class C(object):
def foo(self):
pass
c = C()
c.foo()