ページへ戻る
− Links
印刷
*基本 [#u61fc2c4] クラスの定義は「class」で行います。 コンストラクタは「__init__」で、インスタンス化に「new」は不要です。 class TestClass: def __init__(self): print "construct!" testClass = TestClass() 結果 construct!
(This host) = https://njf.jp