removed all the weakref stuff again. It didn't speed up anything, but made things much more complicated

This commit is contained in:
David Halter
2012-12-09 16:33:24 +01:00
parent ac610f97fb
commit 6bdda36205
11 changed files with 119 additions and 124 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
import copy
import weakref
import contextlib
import parsing
@@ -164,10 +163,10 @@ def fast_parent_copy(obj):
# parent can be a property
continue
try:
setattr(new_obj, key, weakref.ref(new_elements[value()]))
setattr(new_obj, key, new_elements[value])
except KeyError:
pass
elif key == 'parent_stmt':
elif key in ['parent_stmt', 'parent_function']:
continue
elif isinstance(value, list):
setattr(new_obj, key, list_rec(value))