Module Comprehensions

Import path

semmle.python.Comprehensions

Imports

Classes

Comp

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" }