CodeQL library for Python
Search

Module Function

Import path

import semmle.python.Function

Imports

Classes

Arguments

The default values and annotations (type hints) for the arguments in a function definition.

CallableExpr

An expression that generates a callable object, either a function expression or a lambda

FastLocalsFunction
Function

A function, independent of defaults and binding. It is the syntactic entity that is compiled to a code object.

FunctionDef

A def statement. Note that FunctionDef extends Assign as a function definition binds the newly created function

FunctionExpr

An (artificial) expression corresponding to a function definition.

Lambda

A lambda expression, such as lambda x: x+1

Parameter

A parameter. Either a Tuple or a Name (always a Name for Python 3)