Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can do something like

L = R.weight_lattice()
L._print_options['prefix"]="your_prefix_of_choice"

There may be a more elegant way than just reaching into the private "_print_options" attribute.

You can do something like

L = R.weight_lattice()
L._print_options['prefix"]="your_prefix_of_choice"

There may be a more elegant way than just reaching into the private "_print_options" attribute.

EDIT: There is indeed a more elegant way:

L.print_options(prefix="b")

Note that this design is fundamentally conceptually wrong: The "weight lattice" is a UniqueRepresentation object and as such absolutely needs to be immutable (unrelated code could end up with a reference to the same object). So, changing the prefix amounts to scribbling in a global variable. You may find that a weight lattice that has been constructed in a completely unrelated setting also changes print prefix.