expression
.lweight(weight)
The left 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.lweight(c.weight('4'))
Instead of e.lweight(w), you may write w * e.
e.lweight(w)
w * e
c.weight('4') * e
You may even run the simpler:
4 * e