console.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:python-yakumo 作者: yosshy 项目源码 文件源码
def complete(self, text, state):
        """
        Derived from rlcompleter.Completer.complete()
        """
        if self.use_main_ns:
            self.namespace = __main__.__dict__

        if text == "":
            self.help()
            return None

        if state == 0:
            if "." in text:
                self.matches = self.attr_matches(text)
            else:
                self.matches = self.global_matches(text)
        try:
            return self.matches[state]
        except IndexError:
            return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号