def transformFromNative(obj):
        """
        Replace the date, datetime or period tuples in obj.value with
        appropriate strings.
        """
        if obj.value and type(obj.value[0]) == datetime.date:
            obj.isNative = False
            obj.value_param = 'DATE'
            obj.value = ','.join([dateToString(val) for val in obj.value])
            return obj
        # Fixme: handle PERIOD case
        else:
            if obj.isNative:
                obj.isNative = False
                transformed = []
                tzid = None
                for val in obj.value:
                    if tzid is None and type(val) == datetime.datetime:
                        tzid = TimezoneComponent.registerTzinfo(val.tzinfo)
                        if tzid is not None:
                            obj.tzid_param = tzid
                    transformed.append(dateTimeToString(val))
                obj.value = ','.join(transformed)
            return obj
def transformFromNative ( obj ) : if obj . value and type ( obj . value [ 0 ] ) == datetime . date : obj . isNative = False obj . value_param = 'DATE' obj . value = ',' . join ( [ dateToString ( val ) for val in obj . value ] ) return obj else : if obj . isNative : obj . isNative = False transformed = [ ] tzid = None for val in obj . value : if tzid is None and type ( val ) == datetime . datetime : tzid = TimezoneComponent . registerTzinfo ( val . tzinfo ) if tzid is not None : obj . tzid_param = tzid transformed . append ( dateTimeToString ( val ) ) obj . value = ',' . join ( transformed ) return obj
Replace the date, datetime or period tuples in obj.value with
        appropriate strings.