markov.py
def add_chain(self, name, order):
        """
        Add chain to current shelve file

        Args:
            name: chain name
            order: markov chain order
        """

        if name not in self.chains:
            setattr(self.chains, name, MarkovChain(order=order))
        else:
            raise ValueError("Chain with this name already exists")
def add_chain(self, name, order):
        if name not in self.chains:
            setattr(self.chains, name, MarkovChain(order=order))
        else:
            raise ValueError("Chain with this name already exists")
def add_chain ( self , name , order ) : if name not in self . chains : setattr ( self . chains , name , MarkovChain ( order = order ) ) else : raise ValueError ( "Chain with this name already exists" )
Add chain to current shelve file

        Args:
            name: chain name
            order: markov chain order
Add chain to current shelve file