[Tutor] Tutor digest, Vol 1 #539 - 13 msgs

Sharriff Aina NHYTRO@compuserve.com
Wed, 10 Jan 2001 07:51:05 -0500


Hi!

Can someone explain exactly why I have to add "self" to a class function
that I=B4ve defined?

class blah:
    "the new class"
    def myfunction(self):
        print "Hello Class"

the below code would not work:


class blah:
    "the new class"
    def myfunction():
        print "Hello Class"

Thanks for your anticipated help

Sharriff