On Fri, Mar 16, 2012 at 07:44:18AM -0700, Mark Shimozono wrote: > I was messing a little with sage/categories/weyl_groups.py and hit a > bunch of doctest errors,
Which patch are you at? > all apparently caused by an EXAMPLE:: reference to > sage.combinat.sf.all.SFAMonomial. > I tried to fix them by adding > > from sage.combinat.sf.all import SFAMonomial > The test > $ sage -t sage/categories/weyl_groups.py > > made the error message: > > <snip> > > from sage.combinat.sf.all import SFAMonomial > File "/home/msshimo/sage-5.0.beta7/local/lib/python/site-packages/ > sage/combinat/sf/all.py", line 3, in <module> > from sf import SymmetricFunctions > File "/home/msshimo/sage-5.0.beta7/local/lib/python/site-packages/ > sage/combinat/sf/sf.py", line 8, in <module> > from sage.combinat.partition import Partitions > File "/home/msshimo/sage-5.0.beta7/local/lib/python/site-packages/ > sage/combinat/partition.py", line 223, in <module> > from sage.rings.all import QQ, ZZ, factorial, gcd > ImportError: cannot import name factorial I guess you can't even start Sage, right? If some code in sage.categories imports a module from, say, SymmetricFunctions, it is likely to cause an import loop, because the later will import in turn modules from sage.categories. To avoid such import look, I try to stick to the following order: - Python modules - Misc - Categories - Stuff in sage.structure - Basic parents (NN, QQ, ...) - Rest of the stuff and a module in one of the above items should only import modules from higher items. E.g. a module in sage.categories can import from a module in sage.misc, but not reciprocally. Now, this is for imports inside the code of a module. To fix the doctest you mention, it's probably sufficient to do the import in the doctest. Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.