1.1 --- a/micropython/data.py Sun Feb 14 23:49:17 2010 +0100
1.2 +++ b/micropython/data.py Mon Feb 15 01:35:17 2010 +0100
1.3 @@ -483,6 +483,10 @@
1.4
1.5 self.speculative_shelves[-1].append(speculative)
1.6
1.7 + # NOTE: Could record contributing usage as speculative usage.
1.8 +
1.9 + #self.speculative_shelves[-1].append(usage)
1.10 +
1.11 # Forget about any nodes which defined names employing attributes in
1.12 # this branch if the branch is abandoned.
1.13
1.14 @@ -564,7 +568,13 @@
1.15
1.16 for shelved_users in self.user_shelves.pop():
1.17 for name, nodes in shelved_users.items():
1.18 - users[name].update(nodes)
1.19 +
1.20 + # Handle cases where the name is not known at this level.
1.21 +
1.22 + if users.has_key(name):
1.23 + users[name].update(nodes)
1.24 + else:
1.25 + users[name] = nodes
1.26
1.27 # Where each shelved set of definitions is a superset of the eventual
1.28 # definitions for a name, record these specialised sets of usage.