from babregen.commands import order
def first(sub): ...
def second(sub): ...
second.position = 1
print([f.__name__ for f in order([first, second])])['second', 'first']
The registers in the order of their position (then of their module and name).
A function without a position comes after every function that has one.