pyparsing.py 文件源码

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

项目:jira_worklog_scanner 作者: pgarneau 项目源码 文件源码
def setBreak(self,breakFlag = True):
        """Method to invoke the Python pdb debugger when this element is
           about to be parsed. Set C{breakFlag} to True to enable, False to
           disable.
        """
        if breakFlag:
            _parseMethod = self._parse
            def breaker(instring, loc, doActions=True, callPreParse=True):
                import pdb
                pdb.set_trace()
                return _parseMethod( instring, loc, doActions, callPreParse )
            breaker._originalParseMethod = _parseMethod
            self._parse = breaker
        else:
            if hasattr(self._parse,"_originalParseMethod"):
                self._parse = self._parse._originalParseMethod
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号