コード例 #1
0
ファイル: __init__.py プロジェクト: znewman01/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)
コード例 #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)