python类cStyleComment()的实例源码

arg_print.py 文件源码 项目:cmd2 作者: python-cmd2 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self):
        # Uncomment this line to disable Python-style comments but still allow C-style comments
        # self.commentGrammars = pyparsing.Or([pyparsing.cStyleComment])

        # Create command aliases which are shorter
        self.shortcuts.update({'ap': 'aprint', 'op': 'oprint'})

        # Make sure to call this super class __init__ *after* setting commentGrammars and/or updating shortcuts
        cmd2.Cmd.__init__(self)
        # NOTE: It is critical that the super class __init__ method be called AFTER updating certain parameters which
        # are not settable at runtime.  This includes the commentGrammars, shortcuts, multilineCommands, etc.


问题


面经


文章

微信
公众号

扫码关注公众号