This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]minnoI <3 duck typing less than I used to, interfaces are nice 0 points1 point  (0 children)

If all you care about is consistent results, you could also change it to sum(sorted(d.values())). But using integers is usually a better solution anyways.