def quantify_field_dict(field_dict, precision=None, date_precision=None, cleaner=str.strip):
if cleaner:<EOL><INDENT>d = clean_field_dict(field_dict, cleaner=cleaner)<EOL><DEDENT>for k, v in viewitems(d):<EOL><INDENT>if isinstance(d[k], datetime.datetime):<EOL><INDENT>try:<EOL><INDENT>d[k] = float(d[k].strftime('<STR_LIT>'))  <EOL>if date_precision is not None and isinstance(d[k], ROUNDABLE_NUMERIC_TYPES):<EOL><INDENT>d[k] = round(d[k], date_precision)<EOL>continue<EOL><DEDENT><DEDENT>except (IndexError, ValueError, AttributeError, TypeError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if not isinstance(d[k], (int, float)):<EOL><INDENT>try:<EOL><INDENT>d[k] = float(d[k])<EOL><DEDENT>except (IndexError, ValueError, AttributeError, TypeError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if precision is not None and isinstance(d[k], ROUNDABLE_NUMERIC_TYPES):<EOL><INDENT>d[k] = round(d[k], precision)<EOL><DEDENT>if isinstance(d[k], float) and d[k].is_integer():<EOL><INDENT>d[k] = int(v)<EOL><DEDENT><DEDENT>return d<EOL>
r"""Convert strings and datetime objects in the values of a dict into float/int/long, if possible

    Arguments:
      field_dict (dict): The dict to have any values (not keys) that are strings "quantified"
      precision (int): Number of digits of precision to enforce
      cleaner: A string cleaner to apply to all string before


    FIXME: define a time zone for the datetime object and get it to be consistent for travis and local

    >>> sorted(viewitems(quantify_field_dict({'_state': object(), 'x': 12345678911131517, 'y': "\t  Wash Me! \n",
    ...     'z': datetime.datetime(1970, 10, 23, 23, 59, 59, 123456)})))  # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS
    [('x', 12345678911131517), ('y', 'Wash Me!'), ('z', 25...99.123456)]