I want to do two classes: The first one Person
and the second one Messages
class Person():
def __init__(self, name):
self.name = name
class Messages():
def say_hello(person)
pass //Say hello from 'name'
And I want to create an object where I can send the message and the sender.
So I have two options:
Make class Person(Messages)
a child from Messages. And I could send messages like:
p1 = Person('Ryan')
p1.say_hello(p1)
Or make class Messages(Person) a child from Person. And I could send messages like:
messages = Message()
messages.say_hello(Person('Ryan')) //Here is my problem
I don't know if I can even do this and I don't know what is the best solution or the best way to achieve it. And I need to have two different classes, I could do it in one class but there's a ton of messages to declare that it would be illegible.