def task(name): return mark('task', True)
def generator(factory=None): '''Mark the function as a generator. If factory is set, the generator function will be passed to the factory and the result is used.''' return mark('generator', factory)
def priority(priority): '''Specify priority of the generator''' return mark('priority', priority)