answered 11 years ago
You can map exponent vectors more directly to monomials:
sage: P.<x,y,z>=QQ[] sage: [P({tuple(a):1}) for a in WeightedIntegerVectors(3,[1,1,1])] [z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, y^3, x*y^2, x^2*y, x^3]