expression
.rweight(weight)
The right scalar product of an expression by a weight.
See also:
import vcsn c = vcsn.context('lal_char, q')
e = c.expression('<2>a<3>bc', 'trivial') e
e.rweight(c.weight('4'))
Instead of e.rweight(w), you may write e * w.
e.rweight(w)
e * w
e * c.weight('4')
You may even run the simpler:
e * 4