#NEWLINE# def serialize( d ) : #NEWLINE# #INDENT# '\n    Attempts to serialize values from a dictionary, \n    skipping private attrs.\n\n    :param d: A dictionary of params to serialize, \n            typically cls.__dict__\n    ' #NEWLINE# ret = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( k , v ) in d . items ( ) : #NEWLINE# #INDENT# if ( not k . startswith ( '_' ) ) : #NEWLINE# #INDENT# ret [ k ] = str ( d [ k ] ) #NEWLINE# #UNINDENT# #UNINDENT# return d