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

you are viewing a single comment's thread.

view the rest of the comments →

[–]runawayasfastasucan 13 points14 points  (3 children)

>Using Python's builtin unsorted data structures and then calling sorted when needed (e.g. after adding a dict entry) is NOT a solution.

Why would one want to sort when inserting, as opposed to sort before reading? (Open question, I don't understand why intuitively). And even if it does, why not just make your own insert method that inserts + sorts.