Python Wiki
  • Python Wiki
  • PSF Wiki
  • Jython Wiki
    • Edit with CMS Use the web-based editor to create or edit wiki pages
    • Edit on GitHub Fork the repository and submit changes via pull request
/
  • Python Wiki
    • Archive
    • Books & Publications
    • Community & User Groups
    • Conferences
    • Database Programming
    • Documentation
    • Editors & IDEs
    • Education
    • Getting Started
    • GUI Programming
    • Guides and How-Tos
    • Internationalization
    • Python Implementations
    • Infrastructure
    • Language Reference
      • Concurrency
      • Structuredtext
      • AST
      • AST Based Optimization
      • Abstract Base Classes
      • Adapter Registry
      • Alternate Lambda Syntax
      • Alternative Description of Property
      • Alternative Path Class
      • Alternative Path Discussion
      • Alternative Path Module
      • Alternative Path Module Tests
      • Byteplay Doc
      • Computed Attributes Using Property Objects
      • Concurrency
      • Config Parser
      • Config Parser Examples
      • Config Parser Goals
      • Config Parser Shootout
      • Data Representation
      • Decorators
      • Generators
      • Iterator
      • Language Parsing
      • Observer Pattern
      • Structure Annotation
      • Structured Text
      • Switch Statement
      • Time Complexity (Set Code)
      • Time Complexity
      • With Statement
    • Libraries & Tools
    • Multimedia & Games
    • Networking
    • Packaging
    • Performance
    • Platform-Specific
    • Python Software Foundation
    • Python 3 Migration
    • Scientific Computing
    • Security
    • Summer of Code
    • Sprints
    • Testing
    • Web Development
  • PSF Wiki
  • Jython Wiki
  • Contributing
  • People
psf/wiki 0 0
Edit this page
  1. Python Wiki /
  2. Python Wiki /
  3. Language Reference /
  4. AST
View as Markdown

ASTΒΆ

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

AST is an Abstract Syntax Tree, which is built from Python source to analyze the latter without executing.

AST can be used to:

  • build dot graph - http://bugs.python.org/issue10399

See the talk What would you do with an AST by Matthew J Desmarais for more examples.

Previous
Structured Text / Mark Up
Next
AST Based Optimization

2026, Python Software Foundation

Made with Sphinx and Shibuya theme.