(iterable)
return rows
Iterates iterable and returns a list of dictionaries with keys and values converted to Unicode

    >>> gen = ({'0': None, 2: 'two', u'3': 0xc0ffee} for i in range(3))
    >>> get_unicode_dicts(gen)
    [{u'2': u'two', u'0': None, u'3': u'12648430'},
     {u'2': u'two', u'0': None, u'3': u'12648430'},
     {u'2': u'two', u'0': None, u'3': u'12648430'}]
Iterates iterable and returns a list of dictionaries with keys and values converted to Unicode
Iterates iterable and returns a list of dictionaries with keys and values converted to Unicode
def get_unicode_dicts(iterable):
    """
    Iterates iterable and returns a list of dictionaries with keys and values converted to Unicode

    >>> gen = ({'0': None, 2: 'two', u'3': 0xc0ffee} for i in range(3))
    >>> get_unicode_dicts(gen)
    [{u'2': u'two', u'0': None, u'3': u'12648430'},
     {u'2': u'two', u'0': None, u'3': u'12648430'},
     {u'2': u'two', u'0': None, u'3': u'12648430'}]

    """
    def none_or_unicode(val):
        return str(val) if val is not None else val

    rows = []
    for row in iterable:
        rows.append({str(k): none_or_unicode(v) for k, v in row.items()})
    return rows
def get_unicode_dicts ( iterable ) : def none_or_unicode ( val ) : return str ( val ) if val is not None else val rows = [ ] for row in iterable : rows . append ( { str ( k ) : none_or_unicode ( v ) for k , v in row . items ( ) } ) return rows