def to_python(self, data):
        """
        Convert a data to python format.
        """
        if data is None:
            return u''
        if isinstance(data, unicode):
            return data
        else:
            return unicode(data, DEFAULT_ENCODING)
def to_python ( self , data ) : if data is None : return u'' if isinstance ( data , unicode ) : return data else : return unicode ( data , DEFAULT_ENCODING )
Convert a data to python format.