On 07/23/2017 02:42 PM, Michael C wrote: > never mind, I forgot to put 'self' in the method definition!
class mahschool: def print(self): print('Say something') a = mahschool() a.print() Indeed. The error message was clear on this - but not in a way that's always instructive until you're used to it :) "TypeError: print() takes 0 positional arguments but 1 was given" A method is called "silently" (you didn't pass it yourself as an argument when you called print()) with the instance, so you need to declare such a parameter in the method definition. And to give myself an excuse for preaching: it's usually not a great idea to reuse the name of a built-in function. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor