Skip to main content

commands.order

commands.order(registers)

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.

Examples

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']