定義の基本 basic definition
classの定義の基本は以下の通り
class Hoge:
def __init__(self, arg1): # 初期化
print "initialized!"
def process1(self):
print "process1 is called. " + self.name + "!"
def process2(self)
print "process2 is called. " + self.name + "!"
classの定義の基本は以下の通り
class Hoge:
def __init__(self, arg1): # 初期化
print "initialized!"
def process1(self):
print "process1 is called. " + self.name + "!"
def process2(self)
print "process2 is called. " + self.name + "!"