parameters: (self)
docstring: Sort cellvars in the order of varnames and prune from freevars.
docstring_summary: Sort cellvars in the order of varnames and prune from freevars.
docstring_tokens: Sort cellvars in the order of varnames and prune from freevars .
function: def sort_cellvars(self):
          """Sort cellvars in the order of varnames and prune from freevars.
          """
          cells = {}
          for name in self.cellvars:
              cells[name] = 1
          self.cellvars = [name for name in self.varnames
                           if name in cells]
          for name in self.cellvars:
              del cells[name]
          self.cellvars = self.cellvars + cells.keys()
          self.closure = self.cellvars + self.freevars
function_tokens: def sort_cellvars ( self ) : cells = { } for name in self . cellvars : cells [ name ] = 1 self . cellvars = [ name for name in self . varnames if name in cells ] for name in self . cellvars : del cells [ name ] self . cellvars = self . cellvars + cells . keys ( ) self . closure = self . cellvars + self . freevars