Oh. Sorry. It's 500 lines, so I'll just post an example. Windows Vista
and Python 3, just because I forgot.
class K:
def __init__(self): doThis()
def doThis(self): print("Hi.")
k = K()
>From what I understand by your help, the code
class K:
def __init__(self): self.doThis()
def doThis(s
Hi,
Could you post a copy of the code you are working on, so we can help you
better with this?
Usually, when calling a method in the same class you use the syntax:
self.method_name()
'self' refers to an attribute or method within the same class.
Sorry, if this does not help you.
Regards
On Sun, Nov 6, 2011 at 9:59 PM, Max S. wrote:
> Hi. I'm working on a project for my friend, but I'm running into errors.
> No matter what I do, I can't seem to get one method to execute another
> method in the same class. Is there a way that I can do this? Thanks.
>
Yes, you can do this, and i
Hi. I'm working on a project for my friend, but I'm running into errors.
No matter what I do, I can't seem to get one method to execute another
method in the same class. Is there a way that I can do this? Thanks.
___
Tutor maillist - Tutor@python.org