Changeset - 6fa658082c8e
default
0
1
0
Grafted from: 4bbba68bd132
summary: compute lang_stats consistently
Visiting a /statistics with py3 would fail with:
... in statistics
sorted(lang_stats, reverse=True, key=lambda k: k[1])[:10]
TypeError: '<' not supported between instances of 'dict' and 'dict'
The "summary" computation didn't have that problem. And it put '?' as
description for unknown extensions. And it had stable output as it also sorted
on the file extension as secondary key. Just use that.
Visiting a /statistics with py3 would fail with:
... in statistics
sorted(lang_stats, reverse=True, key=lambda k: k[1])[:10]
TypeError: '<' not supported between instances of 'dict' and 'dict'
The "summary" computation didn't have that problem. And it put '?' as
description for unknown extensions. And it had stable output as it also sorted
on the file extension as secondary key. Just use that.
1 file changed with 6 insertions and 9 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)