package pyre-ast
Module TaglessFinal.ExpressionContext
This module provides a type that represents Python expression contexts.
Expression contexts are mainly used to syntactically differentiate among expressions that will be read at runtime, those that will be written at runtime, and those that will be deled at runtime.
As of Python 3.12, there are 6 kinds of expressions with an explicit context field:
Expression.t.nameExpression.t.attributeExpression.t.subscriptExpression.t.listExpression.t.tupleExpression.t.starred
These expressions are allowed to appear at the following "target" positions:
- The
targetsfield inStatement.t.assign. - The
targetfield inStatement.t.aug_assignandStatement.t.ann_assign(except for list, tuple, and starred expression). - The
targetsfield inStatement.t.delete(except for starred expression). - The
targetsfield inStatement.t.for_(except for starred expression). - The
targetsfield inStatement.t.with_(except for starred expression).