Closed liketic closed 7 years ago
Hi,
Just want to confirm, I noticed there are some methods in ServiceClient contain a mutable default argument, for instance: `def get(self, url=None, params={}): """Create a GET request object.
ServiceClient
:param str url: The request URL. :param dict params: Request URL parameters. """ request = self._request(url, params) request.method = 'GET' return request`
And the default argument params is changed inself._request(url, params). Is that as design? I just think it's a little wired. Thanks!
params
self._request(url, params)
Hi @likel You're right it's weird, I will check. Thanks for the report!
Hi,
Just want to confirm, I noticed there are some methods in
ServiceClient
contain a mutable default argument, for instance: `def get(self, url=None, params={}): """Create a GET request object.And the default argument
params
is changed inself._request(url, params)
. Is that as design? I just think it's a little wired. Thanks!