In a previous paper, the author extended the Whitney rank generating function (or Tutte polynomial) from binary matroids to arbitrary functions f : 2^S -> R, where the binary matroid special case is obtained by letting f be the indicator function of the row space of a matrix over GF(2). This paper continues that work in two directions. Firstly, a natural generalisation of the partition function of the statistical mechanical Potts model of a graph is shown to be a partial evaluation of this generalised Whitney function. Secondly, a continuum of minor operations for functions on 2^S is introduced, in which deletion and contraction are distinct points, and the theory of these operations is developed. A related construction of rank-like functions is given, its properties are investigated, and a corresponding continuum of Whitney-type functions is introduced. These functions are shown to contain weight enumerators of general codes over a subset of their domains. We also discuss what these new operations mean at the level of binary matroids and graphs.