Change in vdsm[master]: stomp: creation of outbox class
nsoffer at redhat.com
nsoffer at redhat.com
Mon May 18 22:31:37 UTC 2015
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.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list