Path: blob/master/sage/schemes/generic/notes/imports.txt
4108 views
In order to avoid circular imports, the schemes should only import1from other modules higher in the following hierarchy:231. scheme, point452. spec, ambient_space, morphism673. toric_morphism, glue894. homset10115. affine_scheme, projective_scheme, toric_variety12136. algebraic_scheme, fano_toric_variety14157. hypersurface16178. divisor18199. divisor_group202110. toric_divisor2223If you nevertheless need something from a module lower in the24hierarchy, you should defer the import. That is, put the import at the25class/method level and not in the module scope. For example, scheme.py26needs spec.py for the default base scheme but contains no "import27spec" at the module level.282930313233