forked from SilverStudioGames/WTS
Avoid creating an unnecessary list (use an iterator instead)
This commit is contained in:
parent
20fcacf97b
commit
18f3ae4219
@ -122,7 +122,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