##// END OF EJS Templates
Updated counter_pprint to use most_common() rather than sorted()
Jono Tassia -
Show More
@@ -918,7 +918,7 b' def _counter_pprint(obj, p, cycle):'
918 if cycle:
918 if cycle:
919 p.pretty(cls_ctor(RawText("...")))
919 p.pretty(cls_ctor(RawText("...")))
920 elif len(obj):
920 elif len(obj):
921 p.pretty(cls_ctor(dict(sorted(obj.items(), key=lambda x: x[1], reverse=True))))
921 p.pretty(cls_ctor(dict(obj.most_common())))
922 else:
922 else:
923 p.pretty(cls_ctor())
923 p.pretty(cls_ctor())
924
924
General Comments 0
You need to be logged in to leave comments. Login now