def to_python(self, value):
        if not value or value == 'None':
            return None
        if isinstance(value, Geoposition):
            return value
        if isinstance(value, list):
            return Geoposition(value[0], value[1])

        # default case is string
        value_parts = value.rsplit(',')
        try:
            latitude = value_parts[0]
        except IndexError:
            latitude = '0.0'
        try:
            longitude = value_parts[1]
        except __HOLE__:
            longitude = '0.0'

        return Geoposition(latitude, longitude)
dataset/ETHPy150Open philippbosch/django-geoposition/geoposition/fields.py/GeopositionField.to_python