the object does not have the specified attribute error in python : <p>I am new to python. The following is the code.</p>

<pre><code>class simple:
    def __init__(self, str):
        print("inside the simple constructor")
        self.s = str


# two methods:

def show(self):
    print(self.s)

def showMsg(self, msg):
    print(msg + ":", self.show())


if __name__ == "__main__":
    # create an object:
    x = simple("constructor argument")

    x.show()
    x.showMsg("A message")
</code></pre>

<p>After I run it, I got the </p>

<pre><code>AttributeError: 'simple' object has no attribute 'show'
</code></pre>

<p>So, does anyone know what's going on here? 'show' is not an attribute, right? For my understanding, it should be a method. Does anyone understand what's going on here? Many thanks for your time and attention.</p>
