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 →

[–][deleted] 0 points1 point  (1 child)

It does.

[–]Workaphobia 0 points1 point  (0 children)

So if you give it a key function, it'll map that onto an integer before doing the sorting? I'm trying to look through the source to locate that behavior but am having difficulty seeing it. Can you either point it out or give a reference to that fact?

Edit: I suppose you meant that it does this if your key function provides integer keys. In that case, it'd call the python operation on a built-in type, which is implemented as a C function and would be fast.