(data)
return data
Strips `None` values from a dictionary or `RemoteObject` instance.
Strips `None` values from a dictionary or `RemoteObject` instance.
Strips None values from a dictionary or RemoteObject instance .
def omit_nulls(data):
    """Strips `None` values from a dictionary or `RemoteObject` instance."""
    if not isinstance(data, dict):
        if not hasattr(data, '__dict__'):
            return str(data)
        data = dict(data.__dict__)
    for key in data.keys():
        if data[key] is None:
            del data[key]
    return data
def omit_nulls ( data ) : if not isinstance ( data , dict ) : if not hasattr ( data , '__dict__' ) : return str ( data ) data = dict ( data . __dict__ ) for key in data . keys ( ) : if data [ key ] is None : del data [ key ] return data