boolean (@NotNull final PyFunction function) { if (PyUtil.isInitMethod(function)) { return false; // Who wants to make __init__ abstract?! } final PyUtil.MethodFlags flags = PyUtil.MethodFlags.of(function); assert flags != null : "Function should be called on method!"; final boolean py3K = LanguageLevel.forElement(function).isPy3K(); return flags.isInstanceMethod() || py3K; //Any method could be made abstract in py3 }