请教一个类的初级问题
from thinkbayes import Pmf
class Cookie(Pmf):
"""A map from string bowl ID to probablity."""
def __init__(self, hypos):
"""Initialize self.
hypos: sequence of string bowl IDs
"""
Pmf.__init__(self)
for hypo in hypos:
self.Set(hypo, 1)
self.Normalize()
这里的Pmf.__init__(self)是什么意思?在thinlbayes.py的class Pmf(_DictWrapper)里并没有__init__(self),而且self.Set(hypo, 1)的self应该
是_DictWrapper对象,而不是指的Cookie,那么def __init__(self, hypos):的self是哪个呢?这绕来绕去弄得我有点混乱。