2010-09-07 | Paul Boddie | raw files shortlog changelog graph | Avoid mutation of the loop users when the attribute users are changed. | |
micropython/data.py (file) |
1.1 --- a/micropython/data.py Tue Sep 07 01:07:23 2010 +0200 1.2 +++ b/micropython/data.py Tue Sep 07 20:09:20 2010 +0200 1.3 @@ -528,7 +528,9 @@ 1.4 self.attribute_users.append(new_users) 1.5 1.6 if loop: 1.7 - self.loop_users.append(new_users) 1.8 + loop_users = {} 1.9 + loop_users.update(new_users) 1.10 + self.loop_users.append(loop_users) 1.11 1.12 # Retain a record of scope usage. 1.13