def sort(self, ranks=None):
        """
        Sorts the stack, either by poker ranks, or big two ranks.

        :arg dict ranks:
            The rank dict to reference for sorting. If ``None``, it will
            default to ``DEFAULT_RANKS``.

        :returns:
            The sorted cards.

        """
        ranks = ranks or self.ranks
        self.cards = sort_cards(self.cards, ranks)
def sort ( self , ranks = None ) : ranks = ranks or self . ranks self . cards = sort_cards ( self . cards , ranks )
Sorts the stack, either by poker ranks, or big two ranks.

        :arg dict ranks:
            The rank dict to reference for sorting. If ``None``, it will
            default to ``DEFAULT_RANKS``.

        :returns:
            The sorted cards.