dedalus.tools.general
Extended built-ins, etc.
Module Contents
- class OrderedSet(*args)
Ordered set based on uniqueness of dictionary keys.
- update(*args)
- add(item)
- rev_enumerate(sequence)
Simple reversed enumerate.
- natural_sort(iterable, reverse=False)
Sort alphanumeric strings naturally, i.e. with “1” before “10”. Based on http://stackoverflow.com/a/4836734.
- oscillate(iterable)
Oscillate forward and backward through an iterable.
- unify(objects)
Check if all objects in a collection are equal. If so, return one of them. If not, raise.