Do you need each combination once -- in which case this is right -- or do you need a coefficient in front of each coefficient, different from +/-1 -- in which case this is wrong and what you had previously was right? If there was a test for 2 variables with order 2 I think we could verify which is right -- can you add such a test?

```
    >>> from sympy import *
    >>> from sympy.utilities.iterables import *
    >>> list(combinations([x,y]*2,2))
    [(x, y), (x, x), (x, y), (y, x), (y, y), (x, y)]
    >>> list(combinations_with_replacement([x,y],2))
    [(x, x), (x, y), (y, y)]
```

Notice in the first case there are 4 (x, y) pairs -- and derivatives don't depend on the order of variables -- so there would be a coefficient of 4 in front of diff(L, diff(f, x, y), x, y) whereas in the second case there is 1 (x, y) pair.