Python
Browse Python documentation.
PyAssignmentAn abstract representation of a assignment in python. This includes assignments of variables to functions, other variables, class instantiations, etc.PyAssignmentStatementA class that represents a Python assignment statement in a codebase, such as `x = 1` or `a, b = 1, 2`. This includes potentially multiple Assignments via `statement.assignments`, which represent each assignment of a value to a variable within this statement.PyAttributePython implementation of Attribute detached symbol.PyBlockStatementStatement which contains a block.PyBreakStatementAn abstract representation of a python break statement.PyCatchStatementPython catch clause.PyChainedAttributeAbstract representation of a python chained attribute. This includes methods of python classes and module functions.PyClassExtends Class for Python codebasesPyCodeBlockExtends CodeBlock for Python codebases.PyCommentAbstract representation of python commentsPyCommentGroupA group of related symbols that represent a comment or docstring in Python For example: ``` # Comment 1 # Comment 2 # Comment 3 ``` would be 3 individual comments (accessible via `symbols`), but together they form a `CommentGroup` (accessible via `self`).PyCommentTypeEnum representing different types of comments.PyConditionalExpressionConditional Expressions (A if condition else B)PyDecoratorExtends Decorators for Python codebases.PyFileSourceFile representation for Python codebasePyForLoopStatementAbstract representation of the for loop in PythonPyFunctionExtends Function for Python codebases.PyGenericTypeGeneric python type. Examples: list[int]PyHasBlockExtends HasBlock for Python codebases.PyIfBlockStatementPythons implementation of the if/elif/else statement block. For example, if there is a code block like: if condition1: block1 elif condition2: block2 else: block3 This class represents the entire block, including the conditions and nested code blocks.PyImportExtends Import for Python codebases.PyImportStatementAn abstract representation of a python import statement.PyMatchCasePython match case.PyMatchStatementAbstract representation of the match blockPyNamedTypeNamed python type Examples: int,str (builtin types) Path (classes)PyParameterExtends Parameter for Python codebases.PyPassStatementAn abstract representation of a python pass statement.PyReturnTypePlaceholderA placeholder for a python return type that does not exist. Can be populated using the `edit` method.PyStringAn abstract representation of a python string.PySymbolExtends `Symbol` for Python codebases.PyTryCatchStatementAbstract representation of the try/catch/finally block in Python.PyUnionTypeUnion type Examples: str | intPyWhileStatementAn abstract representation of a python while statement.