Fatihul Ulum Community of Knowledge
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Inheritance

Go down

Inheritance Empty Inheritance

Post  ular sabah Sun Mar 15, 2009 10:53 pm

inheritamce adalah penurununan sari suatu kelas tertentu
bla..bla..bla..bla
Code:

class buyut :
   def __init__(self) :
      print "buyut aku "
class mbah (buyut) :
   def __init__(self) :
      print "mbah aku "
      buyut ()
      
class bapak (mbah) :
   def __init__ (self) :
      print "bapak aku "
      mbah ()
class aku (bapak) :
   def __init__ (self) :
      print "ini aku "
      bapak()
      

#---------------------------------------------

paimo = aku ()
            

ular sabah
Pemula
Pemula

Jumlah posting : 11
Registration date : 15.03.09

Kembali Ke Atas Go down

Kembali Ke Atas


 
Permissions in this forum:
Anda tidak dapat menjawab topik