Apr-29-2020, 10:04 PM
Showing all your code would be helpful.
My guess is you have written a class and play is one of the methods of the class. To call a method the correct syntax is object.method(arguments). Python uses the object to find out where to look for method. It then calls the method like this "method(object, arguments).
Somewhere you are creating an instance of you class and hopfully keeping the returned object in a variable. Something like this:
myobject = MyClass(maybe, some, args)
To call the play method you would type:
myobject.play()
My guess is you have written a class and play is one of the methods of the class. To call a method the correct syntax is object.method(arguments). Python uses the object to find out where to look for method. It then calls the method like this "method(object, arguments).
Somewhere you are creating an instance of you class and hopfully keeping the returned object in a variable. Something like this:
myobject = MyClass(maybe, some, args)
To call the play method you would type:
myobject.play()