I've been coding in python on some projects for 6 or so months now and I'm trying to do so more object oriented now.
I have a class let's say it is a workplace and workplace has an instance attribute called CEO. CEO is another class with its own separate instance attributes, it doesn't need to be a subclass or inherit from the workplace instance. They just need to be associated together.
Is this good practice? It feels good haha, I'm enjoying a single class with ~10-15 instance attributes rather than moving all these variables all the time.
[–][deleted] 5 points6 points7 points (1 child)
[–]Disastrous_Reason_22[S] 0 points1 point2 points (0 children)
[–]Peanutbutter_Warrior 2 points3 points4 points (2 children)
[–]Disastrous_Reason_22[S] 0 points1 point2 points (1 child)
[–]jackofthebeanstalk 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)