Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « ast »

Liste des classes du module ast

Nom de la classe Description
Add Add [extrait de Add.__doc__]
alias alias(identifier name, identifier? asname) [extrait de alias.__doc__]
And And [extrait de And.__doc__]
AnnAssign AnnAssign(expr target, expr annotation, expr? value, int simple) [extrait de AnnAssign.__doc__]
arg arg(identifier arg, expr? annotation, string? type_comment) [extrait de arg.__doc__]
arguments arguments(arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults, arg? kwarg, expr* defaults) [extrait de arguments.__doc__]
Assert Assert(expr test, expr? msg) [extrait de Assert.__doc__]
Assign Assign(expr* targets, expr value, string? type_comment) [extrait de Assign.__doc__]
AST
AsyncFor AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment) [extrait de AsyncFor.__doc__]
AsyncFunctionDef AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment) [extrait de AsyncFunctionDef.__doc__]
AsyncWith AsyncWith(withitem* items, stmt* body, string? type_comment) [extrait de AsyncWith.__doc__]
Attribute Attribute(expr value, identifier attr, expr_context ctx) [extrait de Attribute.__doc__]
AugAssign AugAssign(expr target, operator op, expr value) [extrait de AugAssign.__doc__]
AugLoad Deprecated AST node class. Unused in Python 3. [extrait de AugLoad.__doc__]
AugStore Deprecated AST node class. Unused in Python 3. [extrait de AugStore.__doc__]
auto
Await Await(expr value) [extrait de Await.__doc__]
BinOp BinOp(expr left, operator op, expr right) [extrait de BinOp.__doc__]
BitAnd BitAnd [extrait de BitAnd.__doc__]
BitOr BitOr [extrait de BitOr.__doc__]
BitXor BitXor [extrait de BitXor.__doc__]
BoolOp BoolOp(boolop op, expr* values) [extrait de BoolOp.__doc__]
boolop boolop = And | Or [extrait de boolop.__doc__]
Break Break [extrait de Break.__doc__]
Bytes Deprecated AST node class. Use ast.Constant instead [extrait de Bytes.__doc__]
Call Call(expr func, expr* args, keyword* keywords) [extrait de Call.__doc__]
ClassDef ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list) [extrait de ClassDef.__doc__]
cmpop cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn [extrait de cmpop.__doc__]
Compare Compare(expr left, cmpop* ops, expr* comparators) [extrait de Compare.__doc__]
comprehension comprehension(expr target, expr iter, expr* ifs, int is_async) [extrait de comprehension.__doc__]
Constant Constant(constant value, string? kind) [extrait de Constant.__doc__]
Continue Continue [extrait de Continue.__doc__]
Del Del [extrait de Del.__doc__]
Delete Delete(expr* targets) [extrait de Delete.__doc__]
Dict Dict(expr* keys, expr* values) [extrait de Dict.__doc__]
DictComp DictComp(expr key, expr value, comprehension* generators) [extrait de DictComp.__doc__]
Div Div [extrait de Div.__doc__]
Ellipsis Deprecated AST node class. Use ast.Constant instead [extrait de Ellipsis.__doc__]
Eq Eq [extrait de Eq.__doc__]
ExceptHandler ExceptHandler(expr? type, identifier? name, stmt* body) [extrait de ExceptHandler.__doc__]
excepthandler excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body) [extrait de excepthandler.__doc__]
Expr Expr(expr value) [extrait de Expr.__doc__]
expr expr = BoolOp(boolop op, expr* values) [extrait de expr.__doc__]
expr_context expr_context = Load | Store | Del [extrait de expr_context.__doc__]
Expression Expression(expr body) [extrait de Expression.__doc__]
ExtSlice Deprecated AST node class. Use ast.Tuple instead. [extrait de ExtSlice.__doc__]
FloorDiv FloorDiv [extrait de FloorDiv.__doc__]
For For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment) [extrait de For.__doc__]
FormattedValue FormattedValue(expr value, int conversion, expr? format_spec) [extrait de FormattedValue.__doc__]
FunctionDef FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment) [extrait de FunctionDef.__doc__]
FunctionType FunctionType(expr* argtypes, expr returns) [extrait de FunctionType.__doc__]
GeneratorExp GeneratorExp(expr elt, comprehension* generators) [extrait de GeneratorExp.__doc__]
Global Global(identifier* names) [extrait de Global.__doc__]
Gt Gt [extrait de Gt.__doc__]
GtE GtE [extrait de GtE.__doc__]
If If(expr test, stmt* body, stmt* orelse) [extrait de If.__doc__]
IfExp IfExp(expr test, expr body, expr orelse) [extrait de IfExp.__doc__]
Import Import(alias* names) [extrait de Import.__doc__]
ImportFrom ImportFrom(identifier? module, alias* names, int? level) [extrait de ImportFrom.__doc__]
In In [extrait de In.__doc__]
Index Deprecated AST node class. Use the index value directly instead. [extrait de Index.__doc__]
IntEnum
Interactive Interactive(stmt* body) [extrait de Interactive.__doc__]
Invert Invert [extrait de Invert.__doc__]
Is Is [extrait de Is.__doc__]
IsNot IsNot [extrait de IsNot.__doc__]
JoinedStr JoinedStr(expr* values) [extrait de JoinedStr.__doc__]
keyword keyword(identifier? arg, expr value) [extrait de keyword.__doc__]
Lambda Lambda(arguments args, expr body) [extrait de Lambda.__doc__]
List List(expr* elts, expr_context ctx) [extrait de List.__doc__]
ListComp ListComp(expr elt, comprehension* generators) [extrait de ListComp.__doc__]
Load Load [extrait de Load.__doc__]
LShift LShift [extrait de LShift.__doc__]
Lt Lt [extrait de Lt.__doc__]
LtE LtE [extrait de LtE.__doc__]
Match Match(expr subject, match_case* cases) [extrait de Match.__doc__]
match_case match_case(pattern pattern, expr? guard, stmt* body) [extrait de match_case.__doc__]
MatchAs MatchAs(pattern? pattern, identifier? name) [extrait de MatchAs.__doc__]
MatchClass MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns) [extrait de MatchClass.__doc__]
MatchMapping MatchMapping(expr* keys, pattern* patterns, identifier? rest) [extrait de MatchMapping.__doc__]
MatchOr MatchOr(pattern* patterns) [extrait de MatchOr.__doc__]
MatchSequence MatchSequence(pattern* patterns) [extrait de MatchSequence.__doc__]
MatchSingleton MatchSingleton(constant value) [extrait de MatchSingleton.__doc__]
MatchStar MatchStar(identifier? name) [extrait de MatchStar.__doc__]
MatchValue MatchValue(expr value) [extrait de MatchValue.__doc__]
MatMult MatMult [extrait de MatMult.__doc__]
Mod Mod [extrait de Mod.__doc__]
mod mod = Module(stmt* body, type_ignore* type_ignores) [extrait de mod.__doc__]
Module Module(stmt* body, type_ignore* type_ignores) [extrait de Module.__doc__]
Mult Mult [extrait de Mult.__doc__]
Name Name(identifier id, expr_context ctx) [extrait de Name.__doc__]
NameConstant Deprecated AST node class. Use ast.Constant instead [extrait de NameConstant.__doc__]
NamedExpr NamedExpr(expr target, expr value) [extrait de NamedExpr.__doc__]
NodeTransformer
NodeVisitor
Nonlocal Nonlocal(identifier* names) [extrait de Nonlocal.__doc__]
Not Not [extrait de Not.__doc__]
NotEq NotEq [extrait de NotEq.__doc__]
NotIn NotIn [extrait de NotIn.__doc__]
nullcontext Context manager that does no additional processing. [extrait de nullcontext.__doc__]
Num Deprecated AST node class. Use ast.Constant instead [extrait de Num.__doc__]
operator operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift | RShift | BitOr | BitXor | BitAnd | FloorDiv [extrait de operator.__doc__]
Or Or [extrait de Or.__doc__]
Param Deprecated AST node class. Unused in Python 3. [extrait de Param.__doc__]
Pass Pass [extrait de Pass.__doc__]
pattern pattern = MatchValue(expr value) [extrait de pattern.__doc__]
Pow Pow [extrait de Pow.__doc__]
Raise Raise(expr? exc, expr? cause) [extrait de Raise.__doc__]
Return Return(expr? value) [extrait de Return.__doc__]
RShift RShift [extrait de RShift.__doc__]
Set Set(expr* elts) [extrait de Set.__doc__]
SetComp SetComp(expr elt, comprehension* generators) [extrait de SetComp.__doc__]
Slice Slice(expr? lower, expr? upper, expr? step) [extrait de Slice.__doc__]
slice Deprecated AST node class. [extrait de slice.__doc__]
Starred Starred(expr value, expr_context ctx) [extrait de Starred.__doc__]
stmt stmt = FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment) [extrait de stmt.__doc__]
Store Store [extrait de Store.__doc__]
Str Deprecated AST node class. Use ast.Constant instead [extrait de Str.__doc__]
Sub Sub [extrait de Sub.__doc__]
Subscript Subscript(expr value, expr slice, expr_context ctx) [extrait de Subscript.__doc__]
Suite Deprecated AST node class. Unused in Python 3. [extrait de Suite.__doc__]
Try Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody) [extrait de Try.__doc__]
TryStar TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody) [extrait de TryStar.__doc__]
Tuple Tuple(expr* elts, expr_context ctx) [extrait de Tuple.__doc__]
type_ignore type_ignore = TypeIgnore(int lineno, string tag) [extrait de type_ignore.__doc__]
TypeIgnore TypeIgnore(int lineno, string tag) [extrait de TypeIgnore.__doc__]
UAdd UAdd [extrait de UAdd.__doc__]
UnaryOp UnaryOp(unaryop op, expr operand) [extrait de UnaryOp.__doc__]
unaryop unaryop = Invert | Not | UAdd | USub [extrait de unaryop.__doc__]
USub USub [extrait de USub.__doc__]
While While(expr test, stmt* body, stmt* orelse) [extrait de While.__doc__]
With With(withitem* items, stmt* body, string? type_comment) [extrait de With.__doc__]
withitem withitem(expr context_expr, expr? optional_vars) [extrait de withitem.__doc__]
Yield Yield(expr? value) [extrait de Yield.__doc__]
YieldFrom YieldFrom(expr value) [extrait de YieldFrom.__doc__]

Liste des fonctions du module ast

Signature de la fonction Description
contextmanager(func) @contextmanager decorator. [extrait de contextmanager.__doc__]
copy_location(new_node, old_node)
dump(node, annotate_fields=True, include_attributes=False, *, indent=None)
fix_missing_locations(node)
get_docstring(node, clean=True)
get_source_segment(source, node, *, padded=False) Get source code segment of the *source* that generated *node*. [extrait de get_source_segment.__doc__]
increment_lineno(node, n=1)
iter_child_nodes(node)
iter_fields(node)
literal_eval(node_or_string)
main()
parse(source, filename='<unknown>', mode='exec', *, type_comments=False, feature_version=None)
unparse(ast_obj)
walk(node)

Liste des variables globales du module ast

Nom de la variable globale Valeur
PyCF_ALLOW_TOP_LEVEL_AWAIT 8192
PyCF_ONLY_AST 1024
PyCF_TYPE_COMMENTS 4096