I'm doing some code here and faced this good/bad practice dilemma:
message_id = self.get_message_id(msg)
Notification.set_notification_type(self, message_id)
As you can see, I get some return from self.get_message_id(msg)
and send it as an argument to Notification.set_notification_type()
.
My question is: should I, instead of doing this above, do this:
Notification.set_notification_type(self, msg)
And then, on the Notification.py
file:
def set_notification_type(obj, msg):
message_id = obj.get_message_id(msg)
That is, should I receive raw things in the method and use the obj
parameter to handle what I have to handle or should I send everything already handled by the obj
?
Thank you!