sanic_cors/core.py
def flexible_str(obj):
    """
    A more flexible str function which intelligently handles stringifying
    strings, lists and other iterables. The results are lexographically sorted
    to ensure generated responses are consistent when iterables such as Set
    are used.
    """
    if obj is None:
        return None
    elif(not isinstance(obj, str)
            and isinstance(obj, collections.abc.Iterable)):
        return ', '.join(str(item) for item in sorted(obj))
    else:
        return str(obj)
def flexible_str(obj):
    if obj is None:
        return None
    elif(not isinstance(obj, str)
            and isinstance(obj, collections.abc.Iterable)):
        return ', '.join(str(item) for item in sorted(obj))
    else:
        return str(obj)
def flexible_str ( obj ) : if obj is None : return None elif ( not isinstance ( obj , str ) and isinstance ( obj , collections . abc . Iterable ) ) : return ', ' . join ( str ( item ) for item in sorted ( obj ) ) else : return str ( obj )
A more flexible str function which intelligently handles stringifying
    strings, lists and other iterables. The results are lexographically sorted
    to ensure generated responses are consistent when iterables such as Set
    are used.
A more flexible str function which intelligently handles stringifying strings lists and other iterables . The results are lexographically sorted to ensure generated responses are consistent when iterables such as Set are used .