コード例 #1
0
    def attr(self, name, lineno=None):
        """Return an attribute node for the current extension.  This is useful
        to pass constants on extensions to generated template code.

        ::

            self.attr('_my_attribute', lineno=lineno)
        """
        return nodes.ExtensionAttribute(self.identifier, name, lineno=lineno)
コード例 #2
0
ファイル: ext.py プロジェクト: R4M80MrX/eve-1
 def attr(self, name, lineno=None):
     return nodes.ExtensionAttribute(self.identifier, name, lineno=lineno)