On 5 Aug., 23:07, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> On Fri, Aug 5, 2011 at 1:10 PM, kcrisman <kcris...@gmail.com> wrote:
> > The problem occurs in a (to me) odd spot.  Namely, in sage/misc/
> > functional.py, there is an import of CDF.  Print statements show that
> > - all inside this one line! - we initialize PariInstance, go to
> > integer.pyx for the first time, and lots of other stuff.
>
> > The problem is that all of these things happen BEFORE ANY print
> > statements in complex_number.pyx!  Looking at complex_number.c, it
> > becomes clear that this is because Cython puts a lot of cimport and
> > other stuff long before the "regular" stuff in the C file.
>
> Yeah, it's a mess. By the time misc.all is done, most of the Sage
> library has been loaded, and in a completely chaotic order.

This happens IMHO also because people seem to copy-paste includes and
imports, and tend to import all stuff they *might* use somewhere in a
module, worse -- at the top level.

This of course has "recursive" effects, causes other problems and also
affects the Sage start-up time.


> > As a side note, following the sage imports in sage/all.py is a
> > nightmare.  A whole bunch of the stuff supposedly imported later is
> > already imported right away, because we import sage/misc/all.py really
> > early on, which imports most functions from sage/misc/functional.py -
> > and that imports quite a bit of "main" Sage.
>
> +1. I would love for this to get better cleaned up.

+N


-leif

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