def _silent_none(value):
if value is None:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if type(value) == int:<EOL><INDENT>return value<EOL><DEDENT>if type(value) == bool:<EOL><INDENT>return value<EOL><DEDENT>if not value:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>try:<EOL><INDENT>if str(value) == '<STR_LIT:None>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT><DEDENT>except UnicodeEncodeError:<EOL><INDENT>pass<EOL><DEDENT>return value<EOL>
>>> _silent_none(12)
12
>>> _silent_none(True)
True
>>> _silent_none(None)
''
>>> _silent_none('')
''
>>> _silent_none(False)
False
>>> _silent_none('None')
''
>>> _silent_none("foooooooo")
'foooooooo'