891ec4af721709367842540bcab909c12a85f3de,sos/utils.py,,stable_repr,#Any#,797
Before Change
if isinstance(obj, str):
return repr(obj)
elif isinstance(obj, collections.abc.Mapping):
return "{" + ", ".join(stable_repr(k) + ":" + stable_repr(obj[k])
for k in sorted(obj.keys())) + "}"
elif isinstance(obj, collections.abc.Set):
return "{" + ", ".join(stable_repr(k) for k in sorted(obj)) + "}"
elif isinstance(obj, collections.abc.Sequence):
return "[" + ", ".join(stable_repr(k) for k in obj) + "]"
After Change
items = [stable_repr(k) + ":" + stable_repr(obj[k]) for k in obj.keys()]
return "{" + ", ".join(sorted(items)) + "}"
elif isinstance(obj, collections.abc.Set):
items = [stable_repr(x) for x in obj]
return "{" + ", ".join(sorted(items)) + "}"
elif isinstance(obj, collections.abc.Sequence):
return "[" + ", ".join(stable_repr(k) for k in obj) + "]"
else:
return repr(obj)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: vatlab/SoS
Commit Name: 891ec4af721709367842540bcab909c12a85f3de
Time: 2017-01-03
Author: ben.bob@gmail.com
File Name: sos/utils.py
Class Name:
Method Name: stable_repr
Project Name: vatlab/SoS
Commit Name: 8978e5949e9726fd55948167b5aa6ec2eda0f38a
Time: 2017-01-03
Author: ben.bob@gmail.com
File Name: sos/utils.py
Class Name:
Method Name: stable_repr
Project Name: vatlab/SoS
Commit Name: b64dbfb0c892546669d6dcb19d62e887acb6f14d
Time: 2017-01-03
Author: ben.bob@gmail.com
File Name: sos/utils.py
Class Name: frozendict
Method Name: __repr__
Project Name: vatlab/SoS
Commit Name: 7a50aa394bde60cee848fa4867c5831bb529820b
Time: 2017-01-03
Author: ben.bob@gmail.com
File Name: sos/utils.py
Class Name: frozendict
Method Name: __repr__