MCPcopy Index your code
hub / github.com/python/mypy / SetComprehension

Class SetComprehension

mypy/nodes.py:3035–3049  ·  view source on GitHub ↗

Set comprehension (e.g. {x + 1 for x in a})

Source from the content-addressed store, hash-verified

3033
3034
3035class SetComprehension(Expression):
3036 """Set comprehension (e.g. {x + 1 for x in a})"""
3037
3038 __slots__ = ("generator",)
3039
3040 __match_args__ = ("generator",)
3041
3042 generator: GeneratorExpr
3043
3044 def __init__(self, generator: GeneratorExpr) -> None:
3045 super().__init__()
3046 self.generator = generator
3047
3048 def accept(self, visitor: ExpressionVisitor[T]) -> T:
3049 return visitor.visit_set_comprehension(self)
3050
3051
3052class DictionaryComprehension(Expression):

Callers 3

visit_SetCompMethod · 0.90
read_expressionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…