11-4.在”模型定义”函数里调用另一个”模型定义”函数 问题 想要用一个”模型定义”函数去实现另一个”模型定义”函数 解决方案 假设我们已有一个公司合伙人关系连同它们的结构模型,如Figure 11-4所示: Figure 11-4. A model representing the associate types in a company together with the reporting association 在我们的虚拟的公司里, , team members被一个team lea…
如果是在同一个 module中(也就是同一个py 文件里),直接用就可以如果在不同的module里,例如a.py里有 class A:b.py 里有 class B:如果你要在class B里用class A 需要在 b.py的开头写上 from a import A #mymodel.py import matplotlib.pyplot as pltclass test(object): num = [] def __init__(self, _list): super(test, self…