CodeQL library for Python
codeql/python-all 2.0.1-dev (changelog, source)
Search

Module Comprehensions

Import path

import semmle.python.Comprehensions

Imports

Classes

Comp

The base class for list, set and dictionary comprehensions, and generator expressions.

DictComp

A dictionary comprehension, such as { k:v for k, v in enumerate("0123456789") }

GeneratorExp

A generator expression, such as (var for var in iterable)

ListComp

A list comprehension, such as [ chr(x) for x in range(ord('A'), ord('Z')+1) ]

SetComp

A set comprehension such as { v for v in "0123456789" }