New in version 0.8: Tasklets were added in version 0.8, starting with the betas (named 0.7.9..)

A Tasklet is a light-weight task. It looks very similar to a Task except that it does not save its results to disk. Every time you need its output, it is recomputed. Other than that, you can pass it around, just like a Task.

They also get sometimes automatically generated.

Before Tasklets were a part of jug, often there was a need to write some connector Tasks:

def select_first(t):
return t[0]



This obviously works, but it has two drawbacks:

1. It is not natural Python
2. It is space inefficient on disk. You are saving result and then result0.

First version:

def select_first(t):
return t[0]

If you look closely, you will see that we are now using a Tasklet. This jugfile will work exactly the same, but it will not save the result0 to disk. So you have a performance gain.
result = Task(...)