예제 #1
0
 def proxy_function(*args, **kwargs):
     if Compatibility.PY2:
         bound_method = types.MethodType(unbound_method,
                                         Application.active(), Application)
     else:
         bound_method = types.MethodType(unbound_method,
                                         Application.active())
     return bound_method(*args, **kwargs)
예제 #2
0
파일: __init__.py 프로젝트: adamsxu/commons
 def proxy_function(*args, **kwargs):
   if Compatibility.PY2:
     bound_method = types.MethodType(unbound_method,
                                     Application.active(),
                                     Application)
   else:
     bound_method = types.MethodType(unbound_method,
                                     Application.active())
   return bound_method(*args, **kwargs)