Assign Dictionary Property

if the following are true:
  • the line at time t = i
  • the tab at time t = j
  • statement at line i, tab j = assign statement with target x and expression (Python dictionary elements)
  • expression state at time t = "not_expr"

then the expression at time (t + 1) = Python dictionary elements

The Logicwalk Python simulator starts evaluating a dictionary by setting the current "Expression" to the dictionary.

For example, if the following are true:

  • (the line at time 0) = 1
  • (the tab at time 0) = 0
  • (statement at line 1, tab 0) = numbers = {"ES": "Spain", "MX": "Mexico"}
  • (expression state at time 0) = "not_expr"
then (the expression at time (0 + 1)) = {"ES": "Spain", "MX": "Mexico"}

Try stepping through the simulator to see the "Expression" change to the dictionary.

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Comments

Please log in to add comments