在Python中使用2个参数1

时间:2018-03-30 02:10:14

标签: python python-2.7

我收到了这段代码:

from yellowgod import client
client = Client(address, priv)
price = client.get_order_books('prezels')

yellowgod:

def get_order_books(self):
 return self._post2('returnOrderBook')

_post2:

    def _post2(self, path, signed=False, **kwargs):
    return self._request2('post', path, signed, **kwargs)

_request2:

    def _request2(self, method, path, signed, **kwargs):

    kwargs['json'] = kwargs.get('json', {})
    kwargs['headers'] = kwargs.get('headers', {})

    uri2 = self._create_uri2(path)

    if signed:
        # generate signature e.g. {'v': 28 (or 27), 'r': '0x...', 's': 
        '0x...'}
        kwargs['json'].update(self._generate_signature(kwargs['hash_data']))

        # put hash_data into json param
        for name, value, _param_type in kwargs['hash_data']:
            kwargs['json'][name] = value

        # filter out contract address, not required
        if 'contract_address' in kwargs['json']:
            del(kwargs['json']['contract_address'])

        # remove the passed hash data
        del(kwargs['hash_data'])

    response = getattr(self.session, method)(uri2, **kwargs)
    return self._handle_response(response)

错误是:

  

在给定Python

的情况下完全取2个参数1

我不明白,我正在使用带有1个参数的get_order_books,为什么它说我要求2?

0 个答案:

没有答案