示例#1
0
 def _valid_init(self, method):
     # https://bitbucket.org/pypy/pypy/issues/2462/
     if PYPY:
         if PY2:
             return method.__func__ is not object.__init__.__func__
         return method is not object.__init__
     return (inspect.ismethod(method) or     # PY2
             inspect.isfunction(method) or   # PY3
             is_java_init(method))
示例#2
0
def InitHandler(library, method, docgetter=None):
    Init = _PythonInitHandler if not is_java_init(method) else _JavaInitHandler
    return Init(library, '__init__', method, docgetter)
 def _valid_init(self, method):
     return inspect.ismethod(method) or is_java_init(method)