def _query(url, method, kwargs):
    data = None
    if kwargs in 'data':
        data = kwargs.pop('data')
    if type(data) in (dict, list, tuple):
        data = urlencode(data)

    if isinstance(method, basestring) and \
       method.lower() == 'get' and data:
        if '?' not in url:
            url += '?'
        elif url[-1] not in ('?', '&'):
            url += '&'
        url += data
        data = None

    if data and PY3k:
        data = data.encode('utf-8')
    return url, data
dataset/ETHPy150Open gawel/pyquery/pyquery/openers.py/_query/swapped operands of `in`