On Thu, Aug 5, 2010 at 4:06 PM, Simon King <[email protected]> wrote:
> I think it is easier to do
>  from sage.all import ZZ
> instead of providing its exact location (from sage.rings.integer...).
>
> Moreover, using sage.all is more stable, because the exact location of
> things can change (so that "from sage.rings...." would break), but
> "from sage.all" will still work.
>
> I don't know if "from sage.all import *" works, but I guess it is not
> recommended to load such a huge amount of things if you just need few
> of them.

This probably won't work for code that goes into the Sage library --
at least, for code that is somehow exposed in sage.all.  It will
create circular import problems as sage.all imports your module
(possibly indirectly) and your module imports sage.all.

For code that's not in sage.rings, I sometimes do

from sage.rings.all import ZZ

but in code that's (directly or indirectly) imported by sage.rings.all
that would cause the same problem.

> Cheers,
> Simon

Carl

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

Reply via email to