On Monday, July 28, 2014 7:24:47 PM UTC-7, Stephen Kauffman wrote:
>
>
> exec preparse('ST.<' + gen_str +
> '>=FreeAlgebraQuotient(PRGA,mons_mats[0],mons_mats[1])')
>
Congratulations to get all of this figured out! It's nice to see code of
this generality.
Please use
gen_names=tuple(str(g) for g in PRGA.gens())
ST=FreeAlgebraQuotient(PRGA,mons_mats[0],mons_mats[1],names=gen_names)
instead, and perhaps
ST.inject_variables()
if you want the generators bound to corresponding names in the current
global scope.
You should really avoid "exec" whenever you can. For one thing, it makes it
really difficult for the Python compiler to do a decent job.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.