MCPcopy Index your code
hub / github.com/daviddrysdale/python-phonenumbers / _stable_dict_repr

Function _stable_dict_repr

tools/python/buildprefixdata.py:148–153  ·  view source on GitHub ↗

Return a repr() for a dict keyed by a string, in sorted key order

(strdict)

Source from the content-addressed store, hash-verified

146
147
148def _stable_dict_repr(strdict):
149 """Return a repr() for a dict keyed by a string, in sorted key order"""
150 lines = []
151 for key in sorted(strdict.keys()):
152 lines.append("'%s': %s" % (key, rpr(strdict[key])))
153 return "{%s}" % ", ".join(lines)
154
155
156def _tuple_repr(data):

Callers 1

output_prefixdata_chunkFunction · 0.85

Calls 2

rprFunction · 0.90
appendMethod · 0.80

Tested by

no test coverage detected