当前位置: 首页>>代码示例>>Python>>正文


Python pyobjects.get_unknown函数代码示例

本文整理汇总了Python中rope.base.pyobjects.get_unknown函数的典型用法代码示例。如果您正苦于以下问题:Python get_unknown函数的具体用法?Python get_unknown怎么用?Python get_unknown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_unknown函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_returned_object

 def get_returned_object(self, args):
     result = rope.base.evaluate.get_statement_result(self.scope,
                                                      self.node.body)
     if result is not None:
         return result.get_object()
     else:
         return pyobjects.get_unknown()
开发者ID:FredSanders,项目名称:emacs.d,代码行数:7,代码来源:builtins.py

示例2: _self_set

 def _self_set(self, context):
     if self.holding is not None:
         return
     iterable = context.get_pyname('iterable')
     holding = _infer_sequence_for_pyname(iterable)
     if holding is not None and holding != pyobjects.get_unknown():
         context.save_per_name(holding)
开发者ID:AndreiRO,项目名称:vim,代码行数:7,代码来源:builtins.py

示例3: unsure_pyname

def unsure_pyname(pyname, unbound=True):
    """Return `True` if we don't know what this name references"""
    if pyname is None:
        return True
    if unbound and not isinstance(pyname, pynames.UnboundName):
        return False
    if pyname.get_object() == pyobjects.get_unknown():
        return True
开发者ID:DonJayamanne,项目名称:pythonVSCode,代码行数:8,代码来源:occurrences.py

示例4: _Attribute

 def _Attribute(self, node):
     if not isinstance(node.ctx, ast.Store):
         scope = self.scope.get_inner_scope_for_line(node.lineno)
         pyname = evaluate.eval_node(scope, node.value)
         if pyname is not None and \
            pyname.get_object() != pyobjects.get_unknown():
             if node.attr not in pyname.get_object():
                 self._add_error(node, 'Unresolved attribute')
     ast.walk(node.value, self)
开发者ID:ArthurChiao,项目名称:vim_awesome,代码行数:9,代码来源:finderrors.py

示例5: _object_attributes

def _object_attributes(obj, parent):
    attributes = {}
    for name in dir(obj):
        if name == 'None':
            continue
        child = getattr(obj, name)
        pyobject = None
        if inspect.isclass(child):
            pyobject = BuiltinClass(child, {}, parent=parent)
        elif inspect.isroutine(child):
            pyobject = BuiltinFunction(builtin=child, parent=parent)
        else:
            pyobject = pyobjects.get_unknown()
        attributes[name] = BuiltinName(pyobject)
    return attributes
开发者ID:FredSanders,项目名称:emacs.d,代码行数:15,代码来源:builtins.py

示例6: _set_add

 def _set_add(self, context):
     if self.holding is not None:
         return
     holding = context.get_arguments(['self', 'value'])[1]
     if holding is not None and holding != pyobjects.get_unknown():
         context.save_per_name(holding)
开发者ID:AndreiRO,项目名称:vim,代码行数:6,代码来源:builtins.py

示例7: _dict_add

 def _dict_add(self, context):
     if self.keys is not None:
         return
     key, value = context.get_arguments(['self', 'key', 'value'])[1:]
     if key is not None and key != pyobjects.get_unknown():
         context.save_per_name(get_tuple(key, value))
开发者ID:AndreiRO,项目名称:vim,代码行数:6,代码来源:builtins.py

示例8: _list_add

 def _list_add(self, context):
     if self.holding is not None:
         return
     holding = context.get_argument('value')
     if holding is not None and holding != pyobjects.get_unknown():
         context.save_per_name(holding)
开发者ID:AndreiRO,项目名称:vim,代码行数:6,代码来源:builtins.py

示例9: __init__

 def __init__(self, builtin):
     super(BuiltinUnknown, self).__init__(pyobjects.get_unknown())
     self.builtin = builtin
     self.type = pyobjects.get_unknown()
开发者ID:AndreiRO,项目名称:vim,代码行数:4,代码来源:builtins.py


注:本文中的rope.base.pyobjects.get_unknown函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。