Open jimdewees opened 6 years ago
so what are you suggesting?
The docstring for zmq.Context.instance provides a good implementation example.
You're not very verbose. Are you suggesting that:
ctx = kwargs.get('ctx')
if ctx == None:
ctx = zmq.Context()
self._ctx = ctx
should be reduced to
self._ctx = ctx or zmq.Context()
That would fix the issue that you are trying to get ctx from the kwargs dict, whereas it is defined as a proper keyword argument in the __init__
method definition.
https://github.com/zeromq/pyre/blob/b2a3c9b4d5c7fd08b011e0464b18db997f25df5f/pyre/pyre.py#L41