You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @nidhaloff, I have a question related to the design pattern followed in this class. For me it looks redundant. Take a look at its usage in the tests:
It kind of looks unnecessary to do so since you already have the outer reference, the BRabbit instance. It looks like a self-reference problem or something of that nature. Also, I think this way it will allocate unnecessary space in memory.
Solution
All Inner classes should be moved outside the BRabbit class for better design.
The text was updated successfully, but these errors were encountered:
@wiseaidev Good idea. Unfortunately, I can't remember the reason for this design. It has been years since I worked on this. Would you be interested to contribute your ideas? I can add you as a direct contributor to this repo in order to give you more freedom.
Description
Hey @nidhaloff, I have a question related to the design pattern followed in this class. For me it looks redundant. Take a look at its usage in the tests:
b-rabbit/tests/test_b_rabbit.py
Lines 10 to 11 in f71ed6e
In order to create an
EventPublisher
, you have to call the inner class and pass the outer reference,BRabbit
, as a parameter to the__init__
function:b-rabbit/tests/test_b_rabbit.py
Line 23 in f71ed6e
It kind of looks unnecessary to do so since you already have the outer reference, the
BRabbit
instance. It looks like a self-reference problem or something of that nature. Also, I think this way it will allocate unnecessary space in memory.Solution
All Inner classes should be moved outside the
BRabbit
class for better design.The text was updated successfully, but these errors were encountered: