def _create_point(self, ndim, coords):
        if ndim < 2 or ndim > 3:
            raise TypeError('Invalid point dimension: %s' % str(ndim))

        cs = capi.create_cs(c_uint(1), c_uint(ndim))
        i = iter(coords)
        capi.cs_setx(cs, 0, next(i))
        capi.cs_sety(cs, 0, next(i))
        if ndim == 3: capi.cs_setz(cs, 0, next(i))

        return capi.create_point(cs)
Create a coordinate sequence, set X, Y, [Z], and create point
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/geos/point.py/Point._create_point