1

Trying to translate brickftp to python 2 and I got stuck with this line:

resp = getattr(requests, method)(
    url, **{**self._default_request_kwargs, **kwargs}
)

where:

 @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 {}

what is the python 2 equivalent of this?

CIsForCookies
  • 12,097
  • 11
  • 59
  • 124
  • 1
    @jonrsharpe multiple kwargs support was added "recently", see: https://stackoverflow.com/questions/38860676/multiple-kwargs-in-a-function-call – Josep Valls May 02 '19 at 14:33

0 Answers0