0x1949 Team - FAZEMRX - MANAGER
Edit File: symtable.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> <title>32.3. symtable — Access to the compiler’s symbol tables — Python 2.7.18 documentation</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/classic.css" /> <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/sidebar.js"></script> <link rel="search" type="application/opensearchdescription+xml" title="Search within Python 2.7.18 documentation" href="../_static/opensearch.xml"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="copyright" title="Copyright" href="../copyright.html" /> <link rel="next" title="32.4. symbol — Constants used with Python parse trees" href="symbol.html" /> <link rel="prev" title="32.2. ast — Abstract Syntax Trees" href="ast.html" /> <link rel="shortcut icon" type="image/png" href="../_static/py.png" /> <link rel="canonical" href="file:///usr/share/doc/python2.7/html/library/symtable.html" /> <script type="text/javascript" src="../_static/copybutton.js"></script> </head><body> <div id="outdated-warning" style="padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;"> This document is for an old version of Python that is <a href="https://devguide.python.org/devcycle/#end-of-life-branches">no longer supported</a>. You should install the python3 and python3-doc packages and read the <a href="file:///usr/share/doc/python3-doc/html/library/symtable.html"> Python documentation for the Python3 version packaged in this release</a>. </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="symbol.html" title="32.4. symbol — Constants used with Python parse trees" accesskey="N">next</a> |</li> <li class="right" > <a href="ast.html" title="32.2. ast — Abstract Syntax Trees" accesskey="P">previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="https://www.python.org/">Python</a> »</li> <li> <a href="../index.html">Python 2.7.18 documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> <li class="nav-item nav-item-2"><a href="language.html" accesskey="U"><span class="section-number">32. </span>Python Language Services</a> »</li> <li class="nav-item nav-item-this"><a href=""><span class="section-number">32.3. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">symtable</span></code> — Access to the compiler’s symbol tables</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <section id="module-symtable"> <span id="symtable-access-to-the-compiler-s-symbol-tables"></span><h1><span class="section-number">32.3. </span><a class="reference internal" href="#module-symtable" title="symtable: Interface to the compiler's internal symbol tables."><code class="xref py py-mod docutils literal notranslate"><span class="pre">symtable</span></code></a> — Access to the compiler’s symbol tables<a class="headerlink" href="#module-symtable" title="Permalink to this headline">¶</a></h1> <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/2.7/Lib/symtable.py">Lib/symtable.py</a></p> <hr class="docutils" /> <p>Symbol tables are generated by the compiler from AST just before bytecode is generated. The symbol table is responsible for calculating the scope of every identifier in the code. <a class="reference internal" href="#module-symtable" title="symtable: Interface to the compiler's internal symbol tables."><code class="xref py py-mod docutils literal notranslate"><span class="pre">symtable</span></code></a> provides an interface to examine these tables.</p> <section id="generating-symbol-tables"> <h2><span class="section-number">32.3.1. </span>Generating Symbol Tables<a class="headerlink" href="#generating-symbol-tables" title="Permalink to this headline">¶</a></h2> <dl class="py function"> <dt class="sig sig-object py" id="symtable.symtable"> <span class="sig-prename descclassname"><span class="pre">symtable.</span></span><span class="sig-name descname"><span class="pre">symtable</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compile_type</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#symtable.symtable" title="Permalink to this definition">¶</a></dt> <dd><p>Return the toplevel <a class="reference internal" href="#symtable.SymbolTable" title="symtable.SymbolTable"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolTable</span></code></a> for the Python source <em>code</em>. <em>filename</em> is the name of the file containing the code. <em>compile_type</em> is like the <em>mode</em> argument to <a class="reference internal" href="functions.html#compile" title="compile"><code class="xref py py-func docutils literal notranslate"><span class="pre">compile()</span></code></a>.</p> </dd></dl> </section> <section id="examining-symbol-tables"> <h2><span class="section-number">32.3.2. </span>Examining Symbol Tables<a class="headerlink" href="#examining-symbol-tables" title="Permalink to this headline">¶</a></h2> <dl class="py class"> <dt class="sig sig-object py" id="symtable.SymbolTable"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">symtable.</span></span><span class="sig-name descname"><span class="pre">SymbolTable</span></span><a class="headerlink" href="#symtable.SymbolTable" title="Permalink to this definition">¶</a></dt> <dd><p>A namespace table for a block. The constructor is not public.</p> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_type"> <span class="sig-name descname"><span class="pre">get_type</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_type" title="Permalink to this definition">¶</a></dt> <dd><p>Return the type of the symbol table. Possible values are <code class="docutils literal notranslate"><span class="pre">'class'</span></code>, <code class="docutils literal notranslate"><span class="pre">'module'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'function'</span></code>.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_id"> <span class="sig-name descname"><span class="pre">get_id</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_id" title="Permalink to this definition">¶</a></dt> <dd><p>Return the table’s identifier.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_name"> <span class="sig-name descname"><span class="pre">get_name</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_name" title="Permalink to this definition">¶</a></dt> <dd><p>Return the table’s name. This is the name of the class if the table is for a class, the name of the function if the table is for a function, or <code class="docutils literal notranslate"><span class="pre">'top'</span></code> if the table is global (<a class="reference internal" href="#symtable.SymbolTable.get_type" title="symtable.SymbolTable.get_type"><code class="xref py py-meth docutils literal notranslate"><span class="pre">get_type()</span></code></a> returns <code class="docutils literal notranslate"><span class="pre">'module'</span></code>).</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_lineno"> <span class="sig-name descname"><span class="pre">get_lineno</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_lineno" title="Permalink to this definition">¶</a></dt> <dd><p>Return the number of the first line in the block this table represents.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.is_optimized"> <span class="sig-name descname"><span class="pre">is_optimized</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.is_optimized" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the locals in this table can be optimized.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.is_nested"> <span class="sig-name descname"><span class="pre">is_nested</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.is_nested" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the block is a nested class or function.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.has_children"> <span class="sig-name descname"><span class="pre">has_children</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.has_children" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the block has nested namespaces within it. These can be obtained with <a class="reference internal" href="#symtable.SymbolTable.get_children" title="symtable.SymbolTable.get_children"><code class="xref py py-meth docutils literal notranslate"><span class="pre">get_children()</span></code></a>.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.has_exec"> <span class="sig-name descname"><span class="pre">has_exec</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.has_exec" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the block uses <code class="docutils literal notranslate"><span class="pre">exec</span></code>.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.has_import_star"> <span class="sig-name descname"><span class="pre">has_import_star</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.has_import_star" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the block uses a starred from-import.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_identifiers"> <span class="sig-name descname"><span class="pre">get_identifiers</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_identifiers" title="Permalink to this definition">¶</a></dt> <dd><p>Return a list of names of symbols in this table.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.lookup"> <span class="sig-name descname"><span class="pre">lookup</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.lookup" title="Permalink to this definition">¶</a></dt> <dd><p>Lookup <em>name</em> in the table and return a <a class="reference internal" href="#symtable.Symbol" title="symtable.Symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">Symbol</span></code></a> instance.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_symbols"> <span class="sig-name descname"><span class="pre">get_symbols</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_symbols" title="Permalink to this definition">¶</a></dt> <dd><p>Return a list of <a class="reference internal" href="#symtable.Symbol" title="symtable.Symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">Symbol</span></code></a> instances for names in the table.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.SymbolTable.get_children"> <span class="sig-name descname"><span class="pre">get_children</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.SymbolTable.get_children" title="Permalink to this definition">¶</a></dt> <dd><p>Return a list of the nested symbol tables.</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="symtable.Function"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">symtable.</span></span><span class="sig-name descname"><span class="pre">Function</span></span><a class="headerlink" href="#symtable.Function" title="Permalink to this definition">¶</a></dt> <dd><p>A namespace for a function or method. This class inherits <a class="reference internal" href="#symtable.SymbolTable" title="symtable.SymbolTable"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolTable</span></code></a>.</p> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Function.get_parameters"> <span class="sig-name descname"><span class="pre">get_parameters</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Function.get_parameters" title="Permalink to this definition">¶</a></dt> <dd><p>Return a tuple containing names of parameters to this function.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Function.get_locals"> <span class="sig-name descname"><span class="pre">get_locals</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Function.get_locals" title="Permalink to this definition">¶</a></dt> <dd><p>Return a tuple containing names of locals in this function.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Function.get_globals"> <span class="sig-name descname"><span class="pre">get_globals</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Function.get_globals" title="Permalink to this definition">¶</a></dt> <dd><p>Return a tuple containing names of globals in this function.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Function.get_frees"> <span class="sig-name descname"><span class="pre">get_frees</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Function.get_frees" title="Permalink to this definition">¶</a></dt> <dd><p>Return a tuple containing names of free variables in this function.</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="symtable.Class"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">symtable.</span></span><span class="sig-name descname"><span class="pre">Class</span></span><a class="headerlink" href="#symtable.Class" title="Permalink to this definition">¶</a></dt> <dd><p>A namespace of a class. This class inherits <a class="reference internal" href="#symtable.SymbolTable" title="symtable.SymbolTable"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolTable</span></code></a>.</p> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Class.get_methods"> <span class="sig-name descname"><span class="pre">get_methods</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Class.get_methods" title="Permalink to this definition">¶</a></dt> <dd><p>Return a tuple containing the names of methods declared in the class.</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="symtable.Symbol"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">symtable.</span></span><span class="sig-name descname"><span class="pre">Symbol</span></span><a class="headerlink" href="#symtable.Symbol" title="Permalink to this definition">¶</a></dt> <dd><p>An entry in a <a class="reference internal" href="#symtable.SymbolTable" title="symtable.SymbolTable"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolTable</span></code></a> corresponding to an identifier in the source. The constructor is not public.</p> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.get_name"> <span class="sig-name descname"><span class="pre">get_name</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.get_name" title="Permalink to this definition">¶</a></dt> <dd><p>Return the symbol’s name.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_referenced"> <span class="sig-name descname"><span class="pre">is_referenced</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_referenced" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is used in its block.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_imported"> <span class="sig-name descname"><span class="pre">is_imported</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_imported" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is created from an import statement.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_parameter"> <span class="sig-name descname"><span class="pre">is_parameter</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_parameter" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is a parameter.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_global"> <span class="sig-name descname"><span class="pre">is_global</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_global" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is global.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_declared_global"> <span class="sig-name descname"><span class="pre">is_declared_global</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_declared_global" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is declared global with a global statement.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_local"> <span class="sig-name descname"><span class="pre">is_local</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_local" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is local to its block.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_free"> <span class="sig-name descname"><span class="pre">is_free</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_free" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is referenced in its block, but not assigned to.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_assigned"> <span class="sig-name descname"><span class="pre">is_assigned</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_assigned" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if the symbol is assigned to in its block.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.is_namespace"> <span class="sig-name descname"><span class="pre">is_namespace</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.is_namespace" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">True</span></code> if name binding introduces new namespace.</p> <p>If the name is used as the target of a function or class statement, this will be true.</p> <p>For example:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">table</span> <span class="o">=</span> <span class="n">symtable</span><span class="o">.</span><span class="n">symtable</span><span class="p">(</span><span class="s2">"def some_func(): pass"</span><span class="p">,</span> <span class="s2">"string"</span><span class="p">,</span> <span class="s2">"exec"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">table</span><span class="o">.</span><span class="n">lookup</span><span class="p">(</span><span class="s2">"some_func"</span><span class="p">)</span><span class="o">.</span><span class="n">is_namespace</span><span class="p">()</span> <span class="go">True</span> </pre></div> </div> <p>Note that a single name can be bound to multiple objects. If the result is <code class="docutils literal notranslate"><span class="pre">True</span></code>, the name may also be bound to other objects, like an int or list, that does not introduce a new namespace.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.get_namespaces"> <span class="sig-name descname"><span class="pre">get_namespaces</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.get_namespaces" title="Permalink to this definition">¶</a></dt> <dd><p>Return a list of namespaces bound to this name.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="symtable.Symbol.get_namespace"> <span class="sig-name descname"><span class="pre">get_namespace</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#symtable.Symbol.get_namespace" title="Permalink to this definition">¶</a></dt> <dd><p>Return the namespace bound to this name. If more than one namespace is bound, a <code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code> is raised.</p> </dd></dl> </dd></dl> </section> </section> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../contents.html">Table of Contents</a></h3> <ul> <li><a class="reference internal" href="#">32.3. <code class="xref py py-mod docutils literal notranslate"><span class="pre">symtable</span></code> — Access to the compiler’s symbol tables</a><ul> <li><a class="reference internal" href="#generating-symbol-tables">32.3.1. Generating Symbol Tables</a></li> <li><a class="reference internal" href="#examining-symbol-tables">32.3.2. Examining Symbol Tables</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="ast.html" title="previous chapter"><span class="section-number">32.2. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">ast</span></code> — Abstract Syntax Trees</a></p> <h4>Next topic</h4> <p class="topless"><a href="symbol.html" title="next chapter"><span class="section-number">32.4. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">symbol</span></code> — Constants used with Python parse trees</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/library/symtable.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> <input type="submit" value="Go" /> </form> </div> </div> <script>$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="symbol.html" title="32.4. symbol — Constants used with Python parse trees" >next</a> |</li> <li class="right" > <a href="ast.html" title="32.2. ast — Abstract Syntax Trees" >previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="https://www.python.org/">Python</a> »</li> <li> <a href="../index.html">Python 2.7.18 documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> <li class="nav-item nav-item-2"><a href="language.html" ><span class="section-number">32. </span>Python Language Services</a> »</li> <li class="nav-item nav-item-this"><a href=""><span class="section-number">32.3. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">symtable</span></code> — Access to the compiler’s symbol tables</a></li> </ul> </div> <div class="footer"> © <a href="../copyright.html">Copyright</a> 1990-2024, Python Software Foundation. <br /> The Python Software Foundation is a non-profit corporation. <a href="https://www.python.org/psf/donations/">Please donate.</a> <br /> Last updated on November 21, 2024. <a href="../bugs.html">Found a bug</a>? <br /> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 4.3.2. </div> </body> </html>