(x)
return "%s(%s)"%(type(x).__name__, ', '.join(map(purestr, args)))
A string that follows obj = type(obj)(*obj.args) exactly
A string that follows obj = type(obj)(*obj.args) exactly
A string that follows obj = type ( obj ) ( * obj . args ) exactly
def purestr(x):
    """ A string that follows obj = type(obj)(*obj.args) exactly """
    if not isinstance(x, Basic):
        return str(x)
    if type(x) in slotClasses:
        args = [getattr(x, slot) for slot in x.__slots__]
    elif type(x) in sort_classes:
        args = sorted(x.args, key=default_sort_key)
    else:
        args = x.args
    return "%s(%s)"%(type(x).__name__, ', '.join(map(purestr, args)))
def purestr ( x ) : if not isinstance ( x , Basic ) : return str ( x ) if type ( x ) in slotClasses : args = [ getattr ( x , slot ) for slot in x . __slots__ ] elif type ( x ) in sort_classes : args = sorted ( x . args , key = default_sort_key ) else : args = x . args return "%s(%s)" % ( type ( x ) . __name__ , ', ' . join ( map ( purestr , args ) ) )