Nir Soffer has posted comments on this change. Change subject: stomp: creation of outbox class ......................................................................
Patch Set 2: (3 comments) https://gerrit.ovirt.org/#/c/41067/2/lib/yajsonrpc/stomp.py File lib/yajsonrpc/stomp.py: Line 278: except IndexError: Line 279: return None Line 280: Line 281: Line 282: class Outbox(object): > It is shared across two classes and it was wrapped to enable code reuse. This class does not add any behavior. The only addition is the peek method which is a less pythonic way to do deque[0]. Instead of adapting deque to caller interface, why not adapt the callers to deque interface? Line 283: Line 284: def __init__(self): Line 285: self._outbox = deque() Line 286: Line 292: Line 293: def pop(self): Line 294: return self._outbox.popleft() Line 295: Line 296: def add_right(self, element): append_right? Line 297: self._outbox.append(element) Line 298: Line 299: def add_left(self, element): Line 300: self._outbox.appendleft(element) Line 295: Line 296: def add_right(self, element): Line 297: self._outbox.append(element) Line 298: Line 299: def add_left(self, element): append_left? Line 300: self._outbox.appendleft(element) Line 301: Line 302: Line 303: class AsyncDispatcher(object): -- To view, visit https://gerrit.ovirt.org/41067 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2020b05393daeafaed73f628cf441305a2d52354 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Dima Kuznetsov <dkuzn...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches