Layanan Bahasa Python¶
Python menyediakan sejumlah modul untuk membantu bekerja dengan bahasa Python. Modul-modul ini mendukung tokenizing, parsing, analisis sintaks, bytecode disassembly, dan berbagai fasilitas lainnya.
Modul-modul ini termasuk:
ast
--- Abstract Syntax Trees- Abstract Grammar
- Node classes
AST
- Root nodes
- Literals
- Variables
- Expressions
- Statements
- Control flow
- Pattern matching
- Type parameters
- Function and class definitions
- Async and await
ast
Helpers- Compiler Flags
- Command-Line Usage
symtable
--- Access to the compiler's symbol tablestoken
--- Constants used with Python parse treestok_name
ISTERMINAL()
ISNONTERMINAL()
ISEOF()
ENDMARKER
NAME
NUMBER
STRING
NEWLINE
INDENT
DEDENT
LPAR
RPAR
LSQB
RSQB
COLON
COMMA
SEMI
PLUS
MINUS
STAR
SLASH
VBAR
AMPER
LESS
GREATER
EQUAL
DOT
PERCENT
LBRACE
RBRACE
EQEQUAL
NOTEQUAL
LESSEQUAL
GREATEREQUAL
TILDE
CIRCUMFLEX
LEFTSHIFT
RIGHTSHIFT
DOUBLESTAR
PLUSEQUAL
MINEQUAL
STAREQUAL
SLASHEQUAL
PERCENTEQUAL
AMPEREQUAL
VBAREQUAL
CIRCUMFLEXEQUAL
LEFTSHIFTEQUAL
RIGHTSHIFTEQUAL
DOUBLESTAREQUAL
DOUBLESLASH
DOUBLESLASHEQUAL
AT
ATEQUAL
RARROW
ELLIPSIS
COLONEQUAL
EXCLAMATION
OP
TYPE_IGNORE
TYPE_COMMENT
SOFT_KEYWORD
FSTRING_START
FSTRING_MIDDLE
FSTRING_END
COMMENT
NL
ERRORTOKEN
N_TOKENS
NT_OFFSET
ENCODING
keyword
--- Testing for Python keywordstokenize
--- Tokenizer for Python sourcetabnanny
--- Detection of ambiguous indentationpyclbr
--- Python module browser supportpy_compile
--- Compile Python source filescompileall
--- Byte-compile Python librariesdis
--- Disassembler for Python bytecodepickletools
--- Tools for pickle developers