uTools-Manuals/docs/python/symbol.html
2019-04-08 23:22:26 +08:00

1 line
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="body" role="main"><div class="section" id="module-symbol"><h1><span class="yiyi-st" id="yiyi-10">32.4. <a class="reference internal" href="#module-symbol" title="symbol: Constants representing internal nodes of the parse tree."><code class="xref py py-mod docutils literal"><span class="pre">symbol</span></code></a> - 用于Python解析树的常量</span></h1><p><span class="yiyi-st" id="yiyi-11"><strong>源代码:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/3.5/Lib/symbol.py">Lib / symbol.py</a></span></p><p><span class="yiyi-st" id="yiyi-12">该模块提供了表示解析树的内部节点的数值的常数。</span><span class="yiyi-st" id="yiyi-13">与大多数Python常量不同它们使用小写名称。</span><span class="yiyi-st" id="yiyi-14">有关语言语法的上下文中的名称的定义请参阅Python分发中的文件<code class="file docutils literal"><span class="pre">Grammar/Grammar</span></code></span><span class="yiyi-st" id="yiyi-15">名称映射到的特定数值可能在Python版本之间变化。</span></p><p><span class="yiyi-st" id="yiyi-16">此模块还提供一个附加数据对象:</span></p><dl class="data"><dt id="symbol.sym_name"><span class="yiyi-st" id="yiyi-17"> <code class="descclassname">symbol.</code><code class="descname">sym_name</code></span></dt><dd><p><span class="yiyi-st" id="yiyi-18">将此模块中定义的常量的数字值映射回名称字符串的字典,从而允许生成更加人性化的解析树表示。</span></p></dd></dl></div></div>