[Tutor] Class attribute error
Alan Gauld
alan.gauld at btinternet.com
Sun Nov 17 01:54:40 CET 2013
On 16/11/13 17:13, reutest wrote:
> class myclass():
>
> def test(self):
> print "print this line"
>
>
> if __name__ == '__main__':
> myclass.run()
If you have a question it helps if you ask it rather than have us guess.
In this case I'm guessing you got an error and you are wondering why?
It's because you are calling the run() class method of myclass. And
there is no such method.
If that's not your question please post again with a bit more of a clue
about what you want to know.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list