I have a module including definitions for two different classes in Python. How do I use objects of one class as an argument of the other? Say, I have class definitions for Driver and Car, and tuen want to have a Driver object as an argument for a Car object.
I have a module including definitions for two different classes in Python. How do
Share
Update: The OP is trying to pass an object instance at class definition time (or so I think after seeing his comment). The answer below is not applicable.
Is this what you are trying to achieve?