gramfuzz/gramfuzz/fields.py
def build(self, pre=None, shortest=False):
        """Build the integer, optionally providing a ``pre`` list
        that *may* be used to define prerequisites for a Field being built.

        :param list pre: A list of prerequisites to be collected during the building of a Field.
        :param bool shortest: Whether or not the shortest reference-chain (most minimal) version of the field should be generated.
        """
        if pre is None:
            pre = []

        if self.value is not None and rand.maybe():
            return utils.val(self.value, pre, shortest=shortest)

        if self.min == self.max:
            return self.min

        res = self._odds_val()
        if self.neg and rand.maybe():
            res = -res
        return res
def build(self, pre=None, shortest=False):
        """Build the integer, optionally providing a ``pre`` list
        that *may* be used to define prerequisites for a Field being built.

        :param list pre: A list of prerequisites to be collected during the building of a Field.
        :param bool shortest: Whether or not the shortest reference-chain (most minimal) version of the field should be generated.
        """
        if pre is None:
            pre = []

        if self.value is not None and rand.maybe():
            return utils.val(self.value, pre, shortest=shortest)

        if self.min == self.max:
            return self.min

        res = self._odds_val()
        if self.neg and rand.maybe():
            res = -res
        return res
def build ( self , pre = None , shortest = False ) : if pre is None : pre = [ ] if self . value is not None and rand . maybe ( ) : return utils . val ( self . value , pre , shortest = shortest ) if self . min == self . max : return self . min res = self . _odds_val ( ) if self . neg and rand . maybe ( ) : res = - res return res
Build the integer, optionally providing a ``pre`` list
        that *may* be used to define prerequisites for a Field being built.

        :param list pre: A list of prerequisites to be collected during the building of a Field.
        :param bool shortest: Whether or not the shortest reference-chain (most minimal) version of the field should be generated.
Build the integer optionally providing a pre list that * may * be used to define prerequisites for a Field being built .