【发布时间】:2014-12-05 21:44:59
【问题描述】:
在我的 Python 项目中,我像这样扩展 scipy.stats.rv_continuous:
class GenlogisticGen(LmomDistrMixin, scipy.stats.rv_continuous):
...
我正在尝试在 Read the Docs 上构建文档,但遇到构建错误:
class GenlogisticGen(LmomDistrMixin, scipy.stats.rv_continuous):
TypeError: metaclass conflict: the metaclass of a derived class must
be a (non-strict) subclass of the metaclasses of all its bases
请注意,我根据 Read the Docs FAQ 模拟了 scipy.stats 模块。
我猜想通过模拟基类会出现问题。但是什么?
【问题讨论】:
标签: python scipy mocking python-sphinx metaclass