尝试将enablesReturnKeyAutomatically转换为python 2,但我陷入了这一行:
resp = getattr(requests, method)(
url, **{**self._default_request_kwargs, **kwargs}
)
其中:
@property
def _default_request_kwargs(self):
if self._logged_in:
return {'cookies': {'BrickAPI': self._session_id}}
elif not self._logged_in and self._session_id:
return {'auth': (self._session_id, 'x')}
else:
return {}
python 2等效于什么?