app/models/trait.py
def generate(self, num=None, seed=None):
        """
        Returns num choices from this trait using the given seed
        """
        if num is None:
            num = self.default_num

        length = len(self.choices.all())

        choices = []
        for i in range(num):
            num = seed() % length
            choice = self.choices.all()[num]

            choices.append(choice.generate(seed))

        return choices

        Returns num choices from this trait using the given seed
        
Returns num choices from this trait using the given seed
Returns num choices from this trait using the given seed
def generate(self, num=None, seed=None):
        if num is None:
            num = self.default_num
        length = len(self.choices.all())
        choices = []
        for i in range(num):
            num = seed() % length
            choice = self.choices.all()[num]
            choices.append(choice.generate(seed))
        return choices
def generate ( self , num = None , seed = None ) : if num is None : num = self . default_num length = len ( self . choices . all ( ) ) choices = [ ] for i in range ( num ) : num = seed ( ) % length choice = self . choices . all ( ) [ num ] choices . append ( choice . generate ( seed ) ) return choices
Returns num choices from this trait using the given seed
Returns num choices from this trait using the given seed
"""
        Returns num choices from this trait using the given seed
        """
self
num
seed