Avoid creating an unnecessary list (use an iterator instead)
This commit is contained in:
parent
36d79b4bb2
commit
19bfc010c8
@ -125,7 +125,7 @@ init python early:
|
||||
if isinstance(obj, _list):
|
||||
return [make_revertable(x) for x in obj]
|
||||
elif isinstance(obj, _dict):
|
||||
return dict([(make_revertable(k), make_revertable(v)) for (k,v) in obj.items()])
|
||||
return dict((make_revertable(k), make_revertable(v)) for (k,v) in obj.items())
|
||||
else:
|
||||
return obj
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user