1.1 --- a/docs/rationale.txt Mon Sep 13 01:44:37 2010 +0200
1.2 +++ b/docs/rationale.txt Mon Sep 13 23:52:01 2010 +0200
1.3 @@ -161,29 +161,33 @@
1.4 * Control-flow can make attribute tracking awkward:
1.5
1.6 obj.x # obj must have x
1.7 - if ...: # (branch)
1.8 + if obj.p: # obj must have x, p
1.9 + # (branch)
1.10 obj = ... # obj reset
1.11 obj.attr # obj must have attr
1.12 + # (end of branch)
1.13 else: # (branch)
1.14 - obj.name # obj must have x, name
1.15 - # (merge)
1.16 - # obj must have <nothing>
1.17 + obj.name # obj must have x, p, name
1.18 + # (end of branch)
1.19 + # (merge branch ends)
1.20 + # obj must have either attr or x, p, name
1.21
1.22 Attributes on locals with loops
1.23
1.24 * Loops complicate matters still further:
1.25
1.26 obj.x # obj must have x
1.27 - while ...: # (branch)
1.28 - obj.y # obj must have x, y
1.29 + while obj.p: # obj must have x, p
1.30 + # (branch)
1.31 + obj.y # obj must have x, p, y
1.32 obj = ... # obj reset
1.33 obj.z # obj must have z
1.34 - # (re-branch)
1.35 - # obj must have z, y (obj.y)
1.36 - # obj reset (obj = ...)
1.37 - # obj must have z, y (obj.z)
1.38 - # (merge)
1.39 - # obj must have <nothing>
1.40 + # (re-test)
1.41 + # obj must have z, p
1.42 + # (end of branch)
1.43 + # (null branch - no else)
1.44 + # (merge branch ends)
1.45 + # obj must have either z, p (from loop) or x, p (from null branch)
1.46
1.47 Attributes on attributes
1.48