Generator

class astroid.bases.Generator(parent: FunctionDef, generator_initial_context: InferenceContext | None = None)[source]

Bases: BaseInstance

A special node representing a generator.

Proxied class is set once for all in raw_building.

bool_value(context: InferenceContext | None = None) → Literal[True][source]
callable() → Literal[False][source]
display_type() → str[source]
infer_yield_types() → Iterator[InferenceResult][source]
pytype() → str[source]
special_attributes: GeneratorBaseModel