def num_params(self, lookup_type, num_param):
        """
        Helper routine that returns a boolean indicating whether the number of
        parameters is correct for the lookup type.
        """
        def exactly_two(np): return np == 2
        def two_to_three(np): return np >= 2 and np <=3
        if (self.distance_functions in lookup_type and
            lookup_type != 'dwithin'):
            return two_to_three(num_param)
        else:
            return exactly_two(num_param)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/postgis/operations.py/PostGISOperations.num_params/swapped operands of `in`