Fix representing Objective C instances in the REPL
@@ -54,7 +54,8 @@ def displayhook(_value):
_dict = dict(value.__class__.__dict__)
_dict.update(dict(value.__dict__))
- for key in _dict:
+ for key in list(_dict)
+ :
item = _dict[key]
if item is value or (not isinstance(item, dict) and not isinstance(item, list)):
item = repr(item)
@@ -64,7 +65,7 @@ def displayhook(_value):
elif isinstance(value, Mapping):
val = {}
_dict = value
- for key in _dict:
+ for key in list(_dict):
item = _dict[key]
if item is value or (not isinstance(item, dict) and not isinstance(item, list)):
item = repr(item)
