@njit
def pushpop(size):
 stack = Stack()
 for i in range(size):
  stack.push(i)
 out = []
 while (stack.size > 0):
  out.append(stack.pop())
 return out

@ njit def pushpop ( size ) : stack = Stack ( ) for i in range ( size ) : stack . push ( i ) out = [ ] while ( stack . size > 0 ) : out . append ( stack . pop ( ) ) return out
creates a list of decending numbers from size-1 to 0 .