Author: Carl Friedrich Bolz <[email protected]>
Branch:
Changeset: r82018:3fe07a7b1c13
Date: 2016-01-31 19:10 +0100
http://bitbucket.org/pypy/pypy/changeset/3fe07a7b1c13/
Log: duh, check the index first(!)
diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -116,7 +116,7 @@
def _find_map_attr(self, name, index):
while isinstance(self, PlainAttribute):
- if name == self.name and index == self.index:
+ if index == self.index and name == self.name:
return self
self = self.back
return None
@@ -296,7 +296,7 @@
new_obj._get_mapdict_map().add_attr(new_obj, self.name, self.index,
w_value)
def delete(self, obj, name, index):
- if name == self.name and index == self.index:
+ if index == self.index and name == self.name:
# ok, attribute is deleted
if not self.ever_mutated:
self.ever_mutated = True
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit