コード例 #1
0
ファイル: core.py プロジェクト: harixxy/nodebox-opengl
def cannotcompile(x):
    """Instruct Psyco never to compile the given function, method
or code object."""
    if isinstance(x, types.MethodType):
        x = x.im_func
    if isinstance(x, types.FunctionType):
        x = x.func_code
    if isinstance(x, types.CodeType):
        _psyco.cannotcompile(x)
    else:
        raise TypeError, "unexpected %s object" % type(x).__name__
コード例 #2
0
def cannotcompile(x):
    """Instruct Psyco never to compile the given function, method
or code object."""
    if isinstance(x, types.MethodType):
        x = x.im_func
    if isinstance(x, types.FunctionType):
        x = x.func_code
    if isinstance(x, types.CodeType):
        _psyco.cannotcompile(x)
    else:
        raise TypeError, "unexpected %s object" % type(x).__name__