similar/similar.py
def results(self):
        """
        Returns a list of tuple, ordered by similarity.
        """
        d = dict()
        words = [word.strip() for word in self.haystack]

        if not words:
            raise NoResultException('No similar word found.')

        for w in words:
            d[w] = Levenshtein.ratio(self.needle, w)

        return sorted(d.items(), key=operator.itemgetter(1), reverse=True)

        Returns a list of tuple, ordered by similarity.
        
Returns a list of tuple, ordered by similarity.
Returns a list of tuple ordered by similarity .
def results(self):
        d = dict()
        words = [word.strip() for word in self.haystack]
        if not words:
            raise NoResultException('No similar word found.')
        for w in words:
            d[w] = Levenshtein.ratio(self.needle, w)
        return sorted(d.items(), key=operator.itemgetter(1), reverse=True)
def results ( self ) : d = dict ( ) words = [ word . strip ( ) for word in self . haystack ] if not words : raise NoResultException ( 'No similar word found.' ) for w in words : d [ w ] = Levenshtein . ratio ( self . needle , w ) return sorted ( d . items ( ) , key = operator . itemgetter ( 1 ) , reverse = True )
Returns a list of tuple, ordered by similarity.
Returns a list of tuple ordered by similarity .
"""
        Returns a list of tuple, ordered by similarity.
        """
self