Authored by Daphne Preston-Kendal

sortable iterators for Python

Decorate your generator function with @sortable_iterator and you’ll be able to use the function as a key in sorted. It’ll only look as far ahead in each iterator as it needs to in order to sort the input array — useful if the operations for generating sort key components would otherwise use a lot of computer time or memory.

Edited 1.35 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment