PyDocs

Nav

Python Language Services

Yield

ast

class
  • Yield(value)
Yield(expr? value)
1 Example
>>> print(ast.dump(ast.parse('yield x'), indent=4))
Module(
    body=[
        Expr(
            value=Yield(
                value=Name(id='x')))])

>>> print(ast.dump(ast.parse('yield from x'), indent=4))
Module(
    body=[
        Expr(
            value=YieldFrom(
                value=Name(id='x')))])
from the Python docs
See Also
No see-alsos for ast/Yield
0 Notes
No notes for Yield