def output(self,delimiter = '\t', freqlist = None):
        """Generator yielding formatted strings expressing the time and probabily for each item in the distribution"""
        for type, prob in self:
            if freqlist:
                if isinstance(type,list) or isinstance(type, tuple):
                    yield " ".join(type) + delimiter + str(freqlist[type]) + delimiter + str(prob)
                else:
                    yield type + delimiter + str(freqlist[type]) + delimiter + str(prob)
            else:
                if isinstance(type,list) or isinstance(type, tuple):
                    yield " ".join(type) + delimiter + str(prob)
                else:
                    yield type + delimiter + str(prob)
def output ( self , delimiter = '\t' , freqlist = None ) : for type , prob in self : if freqlist : if isinstance ( type , list ) or isinstance ( type , tuple ) : yield " " . join ( type ) + delimiter + str ( freqlist [ type ] ) + delimiter + str ( prob ) else : yield type + delimiter + str ( freqlist [ type ] ) + delimiter + str ( prob ) else : if isinstance ( type , list ) or isinstance ( type , tuple ) : yield " " . join ( type ) + delimiter + str ( prob ) else : yield type + delimiter + str ( prob )
Generator yielding formatted strings expressing the time and probabily for each item in the distribution