1.1 --- a/docs/syspython.txt Thu Oct 31 16:51:59 2013 +0100
1.2 +++ b/docs/syspython.txt Thu Oct 31 17:18:31 2013 +0100
1.3 @@ -178,6 +178,21 @@
1.4 storelocal(a, b)
1.5 storeattr(module, g, f)
1.6
1.7 +Assignments
1.8 +-----------
1.9 +
1.10 +Since assignments can rebind names used in the value expression, the evaluated
1.11 +expression must be captured and referenced when setting the targets. This is
1.12 +done using the special $expr variable, and so the swap assignment...
1.13 +
1.14 + a, b = b, a
1.15 +
1.16 +...would be written (more or less) as...
1.17 +
1.18 + $expr = (b, a)
1.19 + storelocal(a, apply(operator.getitem, $expr, 0))
1.20 + storelocal(b, apply(operator.getitem, $expr, 1))
1.21 +
1.22 Names and Attributes
1.23 --------------------
1.24