1
0
forked from VimPlug/jedi

add a Flow.previous attribute to be able to access the if flow from an else clause.

This commit is contained in:
Dave Halter
2014-08-05 11:17:18 +02:00
parent 54dce0e3b2
commit c44168f7ad
6 changed files with 29 additions and 9 deletions

View File

@@ -47,7 +47,10 @@ def fast_parent_copy(obj):
elif isinstance(value, list):
setattr(new_obj, key, list_rec(value))
elif isinstance(value, pr.Simple):
setattr(new_obj, key, recursion(value))
try: # because of the circular Flow.previous/Flow.next
setattr(new_obj, key, new_elements[value])
except KeyError:
setattr(new_obj, key, recursion(value))
return new_obj
def list_rec(list_obj):