Assignment expressions

Issue #20 new
Alex Hall created an issue

The docs don’t mention the new assignment expressions in Python 3.8, AKA the walrus operator:

>>> print(ast.dump(ast.parse("(a:=1)"), indent=2))
Module(
  body=[
    Expr(
      value=NamedExpr(
        target=Name(id='a', ctx=Store()),
        value=Constant(value=1)))],
  type_ignores=[])

Comments (1)

  1. Log in to comment