first, you might be interested by this:

L = zip(Vars,p.lm().exponents()[0].sparse_iter())

its faster but still not enough...
then you might look at http://trac.sagemath.org/sage_trac/ticket/7587,
apply it ( review it ;) )
and do

L = [(Vars[i],e) for i,e in enumerate(p.lm().exponents
(as_ETuples=False)[0][:50]) if e]

to get what you want.

Yann

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to