Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/schemes/generic/notes/imports.txt
4108 views
1
In order to avoid circular imports, the schemes should only import
2
from other modules higher in the following hierarchy:
3
4
1. scheme, point
5
6
2. spec, ambient_space, morphism
7
8
3. toric_morphism, glue
9
10
4. homset
11
12
5. affine_scheme, projective_scheme, toric_variety
13
14
6. algebraic_scheme, fano_toric_variety
15
16
7. hypersurface
17
18
8. divisor
19
20
9. divisor_group
21
22
10. toric_divisor
23
24
If you nevertheless need something from a module lower in the
25
hierarchy, you should defer the import. That is, put the import at the
26
class/method level and not in the module scope. For example, scheme.py
27
needs spec.py for the default base scheme but contains no "import
28
spec" at the module level.
29
30
31
32
33