Well the best thing would be if you didn't import paralel 
in multi_polynomial_ideal.py. You should first write some decorators like 
leif mentioned based on the trick that Tom showed so it will become easy to 
make functions have multiple implementations. So that something like the 
following would work:

@first_result
def slow():
   sleep(1)
   print "slow"
    
@slow.add_implementation
def faster():
   print "faster"


slow() #prints slow
slow(algorithm="faster") #prints faster
slow(algorithm="all") #prints faster since it start both but faster return 
before slow.

You should do this because else people might start implementing Toms trick 
also in different places in the sage library wich would in the longterm 
lead to duplicate and hence not easy to maintain code all around the sage 
library.

This, however will not solve your cyclic import problem.
The easiest way to fix this is to move 

from sage.rings.all import Integer

in parallel/decorate.py

right before the line:

if isinstance(p_iter, (int, long, Integer)):





-- 
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