Calling an inherited property in python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3964929/polymorphism-in-python">Polymorphism in Python</a>  </p>
</blockquote>



<p>Hi
I'm trying to call a property in a class, that is inherited from my baseclass, but it doesn't work. I guess I'm missing something, but what?
Here is my  code:</p>

<pre><code>class Produkt:
 def __init__(self,pID,pProdNavn,pNetto):
     self.__produktId = pID     #atributt for produkt nummer
     self.__produktNavn = pProdNavn #atributt for produkt navn
     self.__produktNetto = pNetto   #egenskap for nettopris

 def getName(self): #Metode for å finne produktnavnet
    return self.__produktNavn

class Bok(Produkt):
    def __init__(self,pID,pProdNavn,pNetto,pForfatter):
        Produkt.__init__(self,pID,pProdNavn,pNetto)
        self.__produktForfatter = pForfatter  #atributtp for forfatter

def getNet(self):
    return self.__produktNetto
</code></pre>

<p>as you see I'm trying to call the _productNetto property that is inherited from my Produkt class.</p>

<p>What am I doing wrong?</p>

<p>/Andy</p>
