def hascustominit(cls):
    """Return true if cls does not call default initializer."""
    # In pypy2, the following:

    # >>>> class A(object): pass
    # >>>> A.__init__ is object.__init__

    # returns False. Hence the need to traverse class dicts in mro
    for c in type.mro(cls):
        if '__init__' in c.__dict__:
            return c is not object